Remove automatically set filename if output is empty

This commit is contained in:
ByteDream 2023-01-15 21:43:31 +01:00
parent 685ac85857
commit 577c0679ad
2 changed files with 2 additions and 18 deletions

View file

@ -246,15 +246,7 @@ impl Execute for Archive {
for (formats, mut subtitles) in archive_formats { for (formats, mut subtitles) in archive_formats {
let (primary, additionally) = formats.split_first().unwrap(); let (primary, additionally) = formats.split_first().unwrap();
let formatted_path = primary.format_path( let formatted_path = primary.format_path((&self.output).into(), true);
if self.output.is_empty() {
"{title}.mkv"
} else {
&self.output
}
.into(),
true,
);
let (path, changed) = free_file(formatted_path.clone()); let (path, changed) = free_file(formatted_path.clone());
if changed && self.skip_existing { if changed && self.skip_existing {

View file

@ -213,15 +213,7 @@ impl Execute for Download {
} }
for format in formats { for format in formats {
let formatted_path = format.format_path( let formatted_path = format.format_path((&self.output).into(), true);
if self.output.is_empty() {
"{title}.mkv"
} else {
&self.output
}
.into(),
true,
);
let (path, changed) = free_file(formatted_path.clone()); let (path, changed) = free_file(formatted_path.clone());
if changed && self.skip_existing { if changed && self.skip_existing {