Open kellnerd opened 2 weeks ago
To prevent situations like this, I think harmony should warn if streaming platform artist links are attached to different (maybe even multiple) artists.
Harmony doesn't warn about ambiguous artist or label links, but it does not use them. When an external URL is looked up, the MBID is only filled if there is exactly one result.
Unfortunately there is one caveat: Once an MBID for an external link is cached, it will be used indefinitely, regardless of whether it has been removed from MB in the mean time or has added to another entity, making it ambiguous. The only way to resolve this currently is to reset the MBID mapping cache, which happens every time the Fresh server app is restarted.
I can't see any clever automated solution for this issue. If Harmony was to check if the external link is still unambiguous every time, it would defeat the whole purpose of MBID caching. It would be possible to let the cache forget mappings after a certain time, but in 99% of all cases that is undesired and for the 1% "I messed up this link" were it is desired the optimal maximum cache age is probably only a few minutes. The only feasible thing would probably be a page where the user can enter links which should be forgotten. Until we have that you either have to live with the wrong mapping or ask me to restart the server, sorry 😞
This could've been prevented by also checking the Spotify and iTunes (however iTunes links are country specific, so idk if that works) links for the artist, which would've been matched to BÖ.
That might be an idea which is worth exploring. Assuming that multiple external links of the artist in question are cached, we could get the cached MBID for all of them and only return it if it is the same. But usually only one identifier will be cached as doing more API requests when you already know the MBID is pointless, so you would have to be lucky for that scenario to happen.
I only realized this after a few added releases, because MusicBrainz only shows the Artist Credit and not the artist name without opening the Artist Credit editing menu.
The edit previews in the last tab of the relase editor are very useful for seeded releases, you should probably check these rather than the tracklist tab as they also show disambiguation comments.
Originally posted by @quantenzitrone in https://github.com/kellnerd/harmony/issues/54#issuecomment-2453263715