mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-25 23:45:52 +03:00
[GH-ISSUE #488] Unavailable tracks in market are still returned by playlist_items() #157
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @feldroop on GitHub (Aug 8, 2024).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/488
Describe the bug
I use the function
AuthCodeSpotify::playlist_items(...)and I noticed that the returned list contains playlist items/tracks that are not avalaible in my current country/market. As an input to the function, I supplied my current market (=my home country). I additinally noticed that the fieldFullTrack::available_marketsseems to always be an empty Vec.To Reproduce
Should be clear from my explanation. You just need a spotify playlist with one available and one unavailable song in your market or the one that you use to debug. If it helps, this song is not available in my country, maybe it can help you debug: https://open.spotify.com/intl-de/track/6EkG9mwbTCmM94kueLnlPo
Expected behavior
As the spotify API states, I would expect that unavailable tracks are filtered out from the return value of the
playlist_itemsfunction. Also I expect the mentioned field to not always be an empty Vec.Log/Output data
Additional context
@ramsayleung commented on GitHub (Sep 13, 2024):
How would you know these items and tracks are unavailble in your current country?
How would the library know whether the tracks are available in your current country? This library should be a lightweight client to help user call the Spotify server, it should not do everything for user.
If other users hope to get unavailable tracks in their countries, what should this library do if it filters out the unavailable tracks?
This is Spotify's responsibility, you couldn't ask a library to populate the values which supposed to handled by the Spotify server, this library has no idea how to keep
FullTrack::available_marketsnot always be empty.@feldroop commented on GitHub (Sep 13, 2024):
They are greyed out in the Spotify app GUI and can't be played. I manually checked it.
Of course only Spotify has the information about the availibility of tracks in different markets. This could be an issue of the Spotify servers or the way this library calls the Spotify API. Feel free to close this if you feel like the former is the case. I merely wanted to report the issue and don't disagree with the purpose of this library.
The function
...::playlist_itemsreceives themarketinput exactly for the purpose of filtering out unavailable tracks, as documented in the Spotify API reference. I only expect for this behavior to happen. Of course you shouldn't do any unsolicited filtering for all users.As I mentioned previously, I agree and only wanted to report.
@ramsayleung commented on GitHub (Sep 13, 2024):
Thanks for your report, in order to help Spotify improve their API and services, I strongly encourage you to cut a ticket and report this kind of problem in their offical forum, reporting to developer of 3rd-party library has a little help on improving the quanlity of Spotify API.
There are countless reports around the broken response returned from the Spotify, like #492 and this one, I've also cut a ticket and contacted their customer support to report the broken problem:
https://community.spotify.com/t5/Spotify-for-Developers/The-response-type-of-artist-endpoint-is-marked-as-Integer-in/m-p/5825937#M12321
Honestly speaking, I am a bit frustrated with dealing with the broken problems caused by Spotify while they also don't actively work on reducing these recurring issues.
Anyway, thanks for your report again, it will definitely help other users who has the similar concern and issue.