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);
|
let album = parse_album(&title);
|
||||||
count += 1;
|
count += 1;
|
||||||
let new_name = match album.len() {
|
let new_name = match album.len() {
|
||||||
0 => format!("{artist}/{title}.mp4a"),
|
0 => format!("{artist}/{title}.m4b"),
|
||||||
_ => format!("{artist}/{album}/{title}.mp4b"),
|
_ => format!("{artist}/{album}/{title}.m4b"),
|
||||||
};
|
};
|
||||||
println!("Renaming {} to {}", path.display(), new_name);
|
println!("Renaming {} to {}", path.display(), new_name);
|
||||||
let target_path = Path::new(&base).join(new_name);
|
let target_path = Path::new(&base).join(new_name);
|
||||||
|
|
Loading…
Reference in a new issue