Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidal API returns only tracks that are available in the queried region #65

Open
kellnerd opened this issue Oct 18, 2024 · 7 comments
Open
Labels
blocked Something prevents this from being worked on bug Something isn't working Tidal

Comments

@kellnerd
Copy link
Owner

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)

@kellnerd kellnerd added bug Something isn't working Tidal labels Oct 18, 2024
@ComradeMike
Copy link

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
Copy link

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 🤨).

@kellnerd kellnerd changed the title Tidal API returns only 99 out of 100 tracks Tidal API returns only tracks that are available in the queried region Nov 8, 2024
@phw
Copy link
Collaborator

phw commented Feb 11, 2025

At least here locally I get 100 tracks for region GB with the Tidal v2 implementation from #81 . Not sure if this indicates the issue would be solved, though, as I cannot compare to previous behavior.

@kellnerd
Copy link
Owner Author

At least here locally I get 100 tracks for region GB with the Tidal v2 implementation from #81

@phw Are you sure? It looks complete at first sight, but track 16 is still missing with the Tidal v2 API, both locally and on the public server where I deployed the update.

The Catatonia example is still incomplete as well, so I am going to keep this issue open.

@phw
Copy link
Collaborator

phw commented Feb 20, 2025

I think I probably just looked at the last tracks ending with 100, didn't check every track in between. So yes, maybe it was one track missing also.

I think there should be at least a warning if the tracks returned don't match the total track count.

@phw
Copy link
Collaborator

phw commented Feb 20, 2025

The example https://tidal.com/browse/album/4670631 is really weird. I found three different cases depending on region. I haven't found a region with full track list.

The following shows the total number of tracks and the available tracks for three exemplary regions. These are the three variations I found. Other regions provide the same track listings, though, e.g. FR is the same as DE, JP the same as US etc. No region I tested offers track 10. In none of the tested regions you get more than 10 out of 15 tracks.

DE  6 | - 2 3 - 5 6 7 - -  -  -  - 13  -  -
GB 10 | - 2 3 - 5 6 7 - 9  -  - 12 13 14 15
US 10 | 1 2 3 4 5 6 7 8 -  - 11  - 13  -  -

@phw
Copy link
Collaborator

phw commented Feb 20, 2025

Are you sure? It looks complete at first sight, but track 16 is still missing with the Tidal v2 API, both locally and on the public server where I deployed the update.

Region US or JP will give the full result. Theoretically the provider could try other region if one returns incomplete track lists. But as this requires getting all tracks first, which is multiple calls for long track listings, this is expensive to do.

phw added a commit to phw/harmony that referenced this issue Feb 20, 2025
…ease.

See also kellnerd#65

Update providers/Tidal/v2/lookup.ts

Co-authored-by: David Kellner <[email protected]>
@kellnerd kellnerd added the blocked Something prevents this from being worked on label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Something prevents this from being worked on bug Something isn't working Tidal
Projects
None yet
Development

No branches or pull requests

3 participants