Closed cdlenfert closed 2 years ago
Thanks for a good report, I can reproduce this. @chme is better into this, so hope he can take a look at it.
According to https://developer.spotify.com/documentation/web-api/reference/#/operations/get-an-artists-albums only the albums available for the user should be returned (we are setting the user access token into our requests to Spotify). So the error that a song is not available for the user market should not happen. I'll look into this. Maybe setting the "market" query parameter explicitly has some effect.
I added setting the "market" query parameter, but it does not seem to have any effect on the returned list of albums (or tracks). I can see in the response from spotify, that all tracks of that album are not playable. I believe this is a bug in the Spotify web api (according to the "market" parameter documentation, only album / tracks should be returned that are playable).
To improve the user experience a bit, the unplayable tracks have now (light) grey text color and a info text is displayed, that the track is not playable. (#1374).
This is how it looks like with #1374 now merged:
On occasion search results found in the Owntone Spotify search are unplayable:
The Search
http://owntone.local:3689/#/search/spotify?type=track,artist,album,playlist,audiobook,podcast&query=snuff&limit=3&offset=0
I then scroll down and click on the artist result
http://owntone.local:3689/#/music/spotify/artists/39Yw8FPJXDJyf5L4vK7TD3
Where I see the albums listed and I click into the "Disposable Income" album and try to play it.
The Result