kellnerd / harmony

Music Metadata Aggregator and MusicBrainz Importer
MIT License
22 stars 6 forks source link

Select the release with the matching GTIN if iTunes API returns multiple #10

Closed kellnerd closed 2 weeks ago

kellnerd commented 3 weeks ago

https://harmony.pulsewidth.org.uk/release?gtin=197875266348&itunes=&region=GB&ts=1717477988

iTunes: The API also returned 1 other result, which was skipped: https://music.apple.com/gb/album/1702051779

The other result would have been the correct one with GTIN 197875266348.

iTunes: Extracted GTIN 197985529395 (from artwork URL) does not match the looked up value 197875266348

In this case, both image URLs contain the corresponding barcode, but this is not always the case unfortunately:

https://harmony.pulsewidth.org.uk/release?gtin=882951718827&itunes=&region=GB&ts=1717495471

iTunes: The API also returned 1 other result, which was skipped: https://music.apple.com/gb/album/600624295

That would've been the correct result 🫤

Another example where GTIN would help: https://harmony.pulsewidth.org.uk/release?gtin=822603266801&itunes=&region=GB&ts=1717435544

kellnerd commented 2 weeks ago

Fixed (as far as possible) in https://github.com/kellnerd/harmony/commit/ab6408cb8e2f7c7920dffb75c04b09b2d62a5f08