Skip to content

Commit

Permalink
Merge pull request mipops#883 from ElderOrb/mipops#876
Browse files Browse the repository at this point in the history
support output filename patterns in gui mipops#876
  • Loading branch information
dericed authored Jul 15, 2024
2 parents 55e7852 + e6f4607 commit d5aac4e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Source/GUI/dvrescue/dvrescue/SegmentDataView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -353,5 +353,10 @@ Rectangle {
display: "Video/Audio";
property int minWidth: 200 + columnSpacing + timecodeMetrics.height * 2
}

TableModelColumn {
display: "Filename Pattern"
property int minWidth: 300
}
}
}
27 changes: 23 additions & 4 deletions Source/GUI/dvrescue/dvrescue/SegmentDataViewWithToolbar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ColumnLayout {
property string reportPath
property string videoPath
property string outputPath
property string pattern: patterns.currentText

spacing: 0

Expand Down Expand Up @@ -102,6 +103,21 @@ ColumnLayout {
}
}

ComboBoxEx {
id: patterns
sizeToContents: true
Layout.minimumWidth: modelWidth + 2*leftPadding + 2*rightPadding
model: [
"%FILENAME%_part%PARTNO%",
"%FILENAME%_%RECDATE%_%RECTIME%",
"%FILENAME%_%PARTNO%_%TC%",
"%FILENAME%_%RECDATE%-%RECTIME%_%TC%"
]
onCurrentIndexChanged: {
segmentationOptionsLayout.needsApply = true
}
}

Button {
text: "Reset"
onClicked: {
Expand Down Expand Up @@ -173,7 +189,8 @@ ColumnLayout {
'Recording Time' : '',
'Recording Time: Jump/Repeat' : Qt.point(0, 0),
'Recording Marks' : Qt.point(0, 0),
'Video/Audio' : ''
'Video/Audio' : '',
'Filename Pattern' : ''
}

segmentDataView.model.appendRow(e);
Expand Down Expand Up @@ -250,7 +267,7 @@ ColumnLayout {
}

function populateSegmentData(reportPath, videoPath, outputPath, extraOpts) {
console.debug('populateSegmentData: reportPath = ', reportPath, 'outputPath = ', outputPath)
console.debug('populateSegmentData: reportPath = ', reportPath, 'videoPath = ', videoPath, 'outputPath = ', outputPath)

segmentDataView.model.clear();

Expand All @@ -259,7 +276,7 @@ ColumnLayout {
videoPath = "/cygdrive/" + videoPath.replace(":", "");
}

var extraParams = ['-v', '-X', packagerCtl.effectiveXmlStarletCmd]
var extraParams = ['-v', '-X', packagerCtl.effectiveXmlStarletCmd, '-O', pattern]
var opts = [];
if(recordingStartMarkers.checked)
opts.push('-s')
Expand Down Expand Up @@ -325,7 +342,8 @@ ColumnLayout {
'Recording Time: Jump/Repeat' : Qt.point(entry.recTimeJump, 0),
'Recording Marks' : Qt.point(entry.recStart, 0),
'Video/Audio' : videoAudio.join(' '),
'FileName' : entry.segmentFileName ? entry.segmentFileName : i
'FileName' : entry.segmentFileName ? entry.segmentFileName : i,
'Filename Pattern' : entry.segmentFileName ? entry.segmentFileName : i
}

if(Qt.platform.os === "windows") {
Expand All @@ -334,6 +352,7 @@ ColumnLayout {
if(splittedWinPath.length !== 0) {
splittedWinPath[0] = splittedWinPath[0] + ':'
e.FileName = splittedWinPath.join('\\')
e['Filename Pattern'] = e.FileName
}
}

Expand Down

0 comments on commit d5aac4e

Please sign in to comment.