-
Notifications
You must be signed in to change notification settings - Fork 111
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
Search is returning unavailable tracks #97
Comments
I can think of three possible solutions to this (well, one of them I'm not sure if is possible, and that's the only one I like...):
|
No, I don't think that is available through libspotify. You can get toplists for the region of the current user, but there's nothing telling you what region that is. |
'4'. Filter the track results using |
Actually, cancel that, availability is seemingly for online/offline availability and not what I first thought. EDIT: Wrong again! It is what I first thought:
|
I created a simple pull request #109 to add the market into the search query if it is specified. I do not have proper Python environment to compile/build/test the code, but the code is simple enough do such a change "blind". Some tweaks might be needed though. Please, check if you find it useful. |
I'm not sure how we missed it before... but libspotify does have sp_session_user_country! |
With the migration to the spotify web api, the search results contains tracks that are not available in the user's country.
I found the @trygveaa comment on #94 about this, but we need a way to specify the desired market as a parameter or at least have the 'available_markets' array on the track/album returned object so we can filter it later.
An exemple, as I'm living in Brazil (BR), https://api.spotify.com/v1/search?q=%22Menina+da+saia+verde%22&type=album%2Cartist%2Ctrack&limit=50
The text was updated successfully, but these errors were encountered: