mirror of
https://github.com/aNNiMON/ffmpegbot
synced 2024-09-19 22:54:20 +03:00
Force overwrites for yt-dlp
This commit is contained in:
parent
e049062493
commit
3222624b1f
@ -55,6 +55,6 @@ public class YtDlpCommandBuilder {
|
||||
|
||||
private static List<String> buildOutput(@NotNull YtDlpSession session) {
|
||||
final var targetFilename = FilePath.outputDir() + "/" + session.getOutputFilename();
|
||||
return List.of("-o", targetFilename);
|
||||
return List.of("--force-overwrites", "-o", targetFilename);
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,10 @@ public class YtDlpTask {
|
||||
pb.redirectErrorStream(true);
|
||||
pb.inheritIO();
|
||||
final Process process = pb.start();
|
||||
process.waitFor();
|
||||
int status = process.waitFor();
|
||||
if (status != 0) {
|
||||
throw new RuntimeException("yt-dlp process was finished with non-zero value " + status);
|
||||
}
|
||||
} catch (InterruptedException | IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user