Code fix
This commit is contained in:
parent
54b170a5b5
commit
6919f0214a
@ -212,6 +212,10 @@ impl AppMachine<MatchState> {
|
||||
mh.set_artist_mb_ref(&matches.matching.id, tuple.mb_ref)
|
||||
}
|
||||
|
||||
fn filter_mb_ref(left: &AlbumMbRef, right: &AlbumMbRef) -> bool {
|
||||
(left == right) && !matches!(left, AlbumMbRef::CannotHaveMbid)
|
||||
}
|
||||
|
||||
fn select_album(
|
||||
inner: &mut AppInner,
|
||||
matches: &AlbumMatches,
|
||||
@ -225,7 +229,7 @@ impl AppMachine<MatchState> {
|
||||
let iter = artist.albums.iter();
|
||||
let filtered = iter
|
||||
.filter(|album| album.meta.id != matches.matching)
|
||||
.filter(|album| album.meta.id.mb_ref == tuple.mb_ref);
|
||||
.filter(|album| Self::filter_mb_ref(&album.meta.id.mb_ref, &tuple.mb_ref));
|
||||
clashing.extend(filtered.map(|a| &a.meta.id).cloned())
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user