kellnerd / harmony

Music Metadata Aggregator and MusicBrainz Importer
MIT License
49 stars 7 forks source link

Tidal API returns only 99 out of 100 tracks #65

Open kellnerd opened 2 weeks ago

kellnerd commented 2 weeks ago

This VA release should have 100 tracks, but Harmony only loads 99 of them, with track 16 missing.

No idea how this can be solved, the first page of returned tracks from the API only contains 99 tracks although we set a limit of 100: https://openapi.tidal.com/albums/353004537/items?countryCode=GB&limit=100&offset=0 I also experimented with higher offsets of 100 and 200 just in case, but they all return the following response: {"data":[],"metadata":{"total":99}} (when it should probably say "total":100 on each page)

ComradeMike commented 2 weeks ago

https://api.deezer.com/track/2717935892

Looks like that track isn't available in some countries, such as the UK. It shows the track for me on the Tidal website, but not in the phone app. Changing it to a country where it is available (eg the US) loads the missing track: https://harmony.pulsewidth.org.uk/release?tidal=353004537&region=US&ts=1729288929

If you want to test with a more obvious case of a release where some tracks have limited availability (and also doesn't hammer MB with API requests): https://www.qobuz.com/gb-en/album/greatest-hits-catatonia/0809274919366 https://www.qobuz.com/us-en/album/greatest-hits-catatonia/0809274919366 https://harmony.pulsewidth.org.uk/release?spotify=0Oej4mOTCxm9VNZz3xHtKw&gtin=809274919366&deezer=&region=GB&ts=1729288481 https://harmony.pulsewidth.org.uk/release?gtin=809274919366&tidal=&region=GB&ts=1729288482

ComradeMike commented 1 week ago

Looking at my above example again, I realised track 10 (the one with 0 available regions) is missing on the Tidal website: https://tidal.com/browse/album/4670631. So the website won't show a track if it's not available somewhere. It even lets me play previews of tracks 1, 4 and 8, despite them not being available in the UK (and claims I can listen to the full track by signing up 🤨).