mirror of
https://github.com/SinTan1729/movie-rename.git
synced 2024-12-25 19:58:36 -06:00
fix: Still ask for language for preprocessed files
This commit is contained in:
parent
96fcf425b0
commit
c7c1988b73
1 changed files with 27 additions and 21 deletions
|
@ -62,6 +62,10 @@ pub async fn process_file(
|
|||
|
||||
// Check if it should be ignored
|
||||
if preprocessed && new_name_base.is_empty() {
|
||||
eprintln!(
|
||||
" Ignoring {} as per previous choice for related files...",
|
||||
file_base
|
||||
);
|
||||
return (filename_without_ext, "".to_string(), false);
|
||||
}
|
||||
|
||||
|
@ -140,6 +144,12 @@ pub async fn process_file(
|
|||
}
|
||||
};
|
||||
|
||||
// Create the new name
|
||||
new_name_base = choice.rename_format(pattern.to_string());
|
||||
} else {
|
||||
println!(" Using previous choice for related files...");
|
||||
}
|
||||
|
||||
// Handle the case for subtitle files
|
||||
if ["srt", "ssa"].contains(&extension.as_str()) {
|
||||
// Try to detect if there's already language info in the filename, else ask user to choose
|
||||
|
@ -161,10 +171,6 @@ pub async fn process_file(
|
|||
}
|
||||
}
|
||||
|
||||
// Create the new name
|
||||
new_name_base = choice.rename_format(pattern.to_string());
|
||||
}
|
||||
|
||||
// Add extension and stuff to the new name
|
||||
let mut new_name_with_ext = new_name_base.clone();
|
||||
if !extension.is_empty() {
|
||||
|
|
Loading…
Reference in a new issue