fix(providers): warn if GTIN lookup found multiple results for Spotify / Tidal#29
Conversation
|
Some thoughts about this in general: In the long term it would be good if there could be some handling of multiple results. Something like this is already mentioned in the roadmap (#6) "Allow providers to return multiple releases, i.e. different variants (e.g. for Bandcamp)". While testing I had one release that failed the lookup for iTunes due to mismatched track length. However, iTunes found multiple results and one that would have matched the tracklists from other providers was among them. I unfortunately could not find the example again in my notes, but if I do I'll post it. For the barcode collision example 635669065024 it would also help as currently all of iTunes, Tidal and Spotify return one random result of the following two albums: https://music.apple.com/gb/album/barcheinu/1526351623 No matter which one you originally wanted to lookup you most likely end up with a mixed result on Harmony. |
…y / Tidal Adapt the existing logic already implemented in iTunes and generalize it.
I have found the following example in my notes, taken from the server logs: |
Just to clarify, the Beatport provider explicitly returns the first release from the search results with a matching barcode: harmony/providers/Beatport/mod.ts Line 106 in 0c9cd5f I don't believe I've ever encountered a situation where a GTIN search has returned multiple releases, but the code will either return a single release or |
For Spotify and Tidal show a warning with a list of URLs if a GTIN lookup found more than one match.
Adapt the existing logic already implemented in iTunes and generalize it by adding a
ReleaseLookup.warnMultipleResultshelper.Notes:
This should resolve #25