add dir per title
This commit is contained in:
parent
64b0e0050a
commit
e22c29ce64
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}.m4b"),
|
||||
_ => format!("{artist}/{album}/{title}.m4b"),
|
||||
0 => format!("{artist}/{title}/{title}.m4b"),
|
||||
_ => format!("{artist}/{album}/{title}/{title}.m4b"),
|
||||
};
|
||||
println!("Renaming {} to {}", path.display(), new_name);
|
||||
let target_path = Path::new(&base).join(new_name);
|
||||
|
|
Loading…
Reference in a new issue