mirror of
https://github.com/SinTan1729/movie-rename.git
synced 2024-12-25 19:58:36 -06:00
fix: Do not print both processing and ignoring
This commit is contained in:
parent
8a84f1b2b6
commit
7cb18202eb
1 changed files with 3 additions and 2 deletions
|
@ -34,14 +34,15 @@ pub async fn process_file(
|
|||
file_base = parts.1.to_string();
|
||||
}
|
||||
}
|
||||
println!(" Processing {}...", file_base);
|
||||
|
||||
// Parse the filename for metadata
|
||||
let metadata = Metadata::from(file_base.as_str()).expect(" Could not parse filename!");
|
||||
|
||||
// Process only if it's a valid file format
|
||||
let mut extension = metadata.extension().unwrap_or("").to_string();
|
||||
if !["mp4", "avi", "mkv", "flv", "m4a", "srt", "ssa"].contains(&extension.as_str()) {
|
||||
if ["mp4", "avi", "mkv", "flv", "m4a", "srt", "ssa"].contains(&extension.as_str()) {
|
||||
println!(" Processing {}...", file_base);
|
||||
} else {
|
||||
println!(" Ignoring {}...", file_base);
|
||||
return ("n/a".to_string(), false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue