Skip to content

Commit

Permalink
use lower case name for processed files map
Browse files Browse the repository at this point in the history
* so duplicates with different casing still get detected
  • Loading branch information
Esgrove committed Apr 29, 2024
1 parent d86740a commit 666dfae
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/renamer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,10 @@ impl Renamer {
}

if self.config.tags_only {
processed_files.entry(formatted_name).or_default().push(track.clone());
processed_files
.entry(formatted_name.to_lowercase())
.or_default()
.push(track.clone());
continue;
}

Expand Down Expand Up @@ -357,7 +360,10 @@ impl Renamer {
}
}

processed_files.entry(formatted_name).or_default().push(track.clone());
processed_files
.entry(formatted_name.to_lowercase())
.or_default()
.push(track.clone());
}

println!("{}", "\nFinished".green());
Expand Down Expand Up @@ -469,8 +475,8 @@ impl Renamer {
"{}",
format!("Duplicates ({}):", duplicate_tracks.len()).magenta().bold()
);
for (name, tracks) in duplicate_tracks.iter() {
println!("{}", name.yellow());
for (_, tracks) in duplicate_tracks.iter() {
println!("{}", tracks[0].name.yellow());
for track in tracks {
println!(" {}", track);
}
Expand Down

0 comments on commit 666dfae

Please sign in to comment.