fix: properly handle editing multiple files
fixed wrong parsing causing to overwrite all files with wrong metadata fixed wrong file header in editor buffer
This commit is contained in:
+3
-2
@@ -12,7 +12,7 @@ pub fn move_files(
|
||||
should_copy: bool,
|
||||
has_parent: bool,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let target_dir = PathBuf::from("/home/user/Music/Tracks");
|
||||
let target_dir = PathBuf::from("/home/user/Desktop/coding/keks-sort");
|
||||
|
||||
let artist = tag.artist();
|
||||
let album = tag.album();
|
||||
@@ -37,9 +37,10 @@ pub fn move_files(
|
||||
let target = target_dir.join(artist_dir).join(album_dir.as_ref());
|
||||
|
||||
let file_name = if let Some(track_number) = track_number {
|
||||
let number: u32 = track_number.parse()?;
|
||||
PathBuf::from(format!(
|
||||
"{:02}. {} - {}.flac",
|
||||
track_number,
|
||||
number,
|
||||
artist.unwrap(),
|
||||
title.unwrap(),
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user