forked from j62/ctbrec
Fix "rerun pp" for MFC dash downloads
This commit is contained in:
parent
6fb1ee5153
commit
2fb2c932aa
|
@ -415,7 +415,8 @@ public class RecordingsTab extends Tab implements TabSelectionListener {
|
|||
|
||||
MenuItem rerunPostProcessing = new MenuItem("Rerun Post-Processing");
|
||||
rerunPostProcessing.setOnAction(e -> triggerPostProcessing(first));
|
||||
if ((first.getStatus() == State.FINISHED || first.getStatus() == State.WAITING) && first.isSegmented()) {
|
||||
if (((first.getStatus() == State.FINISHED || first.getStatus() == State.WAITING) && first.isSegmented())
|
||||
|| first.getStatus() == State.WAITING && first.isSegmented()) {
|
||||
contextMenu.getItems().add(rerunPostProcessing);
|
||||
}
|
||||
|
||||
|
|
|
@ -334,9 +334,11 @@ public class DashDownload implements Download {
|
|||
@Override
|
||||
public void postprocess(Recording recording) {
|
||||
try {
|
||||
new FfmpegMuxer(downloadDir.toFile(), finalFile);
|
||||
targetFile = finalFile;
|
||||
String path = recording.getPath();
|
||||
File dir = new File(Config.getInstance().getSettings().recordingsDir, path);
|
||||
File file = new File(dir.getParentFile(), dir.getName().substring(0, dir.getName().length() - 5));
|
||||
new FfmpegMuxer(dir, file);
|
||||
targetFile = file;
|
||||
recording.setPath(path.substring(0, path.length() - 5));
|
||||
} catch (ProcessExitedUncleanException | IOException e) {
|
||||
LOG.error("Error while merging dash segments", e);
|
||||
|
|
|
@ -324,6 +324,9 @@ public class MyFreeCamsModel extends AbstractModel {
|
|||
|
||||
@Override
|
||||
public Download createDownload() {
|
||||
if(streamUrl == null) {
|
||||
updateStreamUrl();
|
||||
}
|
||||
if(streamUrl.endsWith("m3u8")) {
|
||||
return super.createDownload();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue