Add a library identifier to disambiguate clashes in the library #238

Merged
wojtek merged 16 commits from 231---differentiate-release-groups-with-same-title-but-different-type-clash into main 2025-01-02 15:50:55 +01:00
Showing only changes of commit edac12ada8 - Show all commits

View File

@ -54,7 +54,7 @@ impl Artist {
} }
} }
fn merge_album_with_lib_id( fn merge_album_by_lib_id(
primary_albums: &mut [Album], primary_albums: &mut [Album],
mut secondary_album: Album, mut secondary_album: Album,
) -> Option<Album> { ) -> Option<Album> {
@ -76,7 +76,7 @@ impl Artist {
) -> HashMap<String, Vec<Album>> { ) -> HashMap<String, Vec<Album>> {
let mut secondary_without_id = HashMap::<String, Vec<Album>>::new(); let mut secondary_without_id = HashMap::<String, Vec<Album>>::new();
for secondary_album in secondary_albums.drain(..) { for secondary_album in secondary_albums.drain(..) {
let unmerged = Artist::merge_album_with_lib_id(primary_albums, secondary_album); let unmerged = Artist::merge_album_by_lib_id(primary_albums, secondary_album);
if let Some(secondary_album) = unmerged { if let Some(secondary_album) = unmerged {
secondary_without_id secondary_without_id
.entry(secondary_album.meta.id.title.clone()) .entry(secondary_album.meta.id.title.clone())