use correct file extension when renaming
This commit is contained in:
parent
de2df1242b
commit
2ee3a89688
1 changed files with 2 additions and 2 deletions
|
@ -33,8 +33,8 @@ fn rename_files(directory: &str, base: &str) -> Result<i32> {
|
|||
let album = parse_album(&title);
|
||||
count += 1;
|
||||
let new_name = match album.len() {
|
||||
0 => format!("{artist}/{title}.mp4a"),
|
||||
_ => format!("{artist}/{album}/{title}.mp4b"),
|
||||
0 => format!("{artist}/{title}.m4b"),
|
||||
_ => format!("{artist}/{album}/{title}.m4b"),
|
||||
};
|
||||
println!("Renaming {} to {}", path.display(), new_name);
|
||||
let target_path = Path::new(&base).join(new_name);
|
||||
|
|
Loading…
Reference in a new issue