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:
2026-09-06 00:16:07 +02:00
parent 6c5b0e1c5f
commit 96947f625a
4 changed files with 107 additions and 30 deletions
+3 -2
View File
@@ -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(),
))