librespot icon indicating copy to clipboard operation
librespot copied to clipboard

Spotify track symlinks not resolved

Open XDjackieXD opened this issue 9 years ago • 2 comments

Some songs in Spotify "symlink" to the actual song and therefore can't be played by librespot. This does not happen when using spirc as the spotify client already resolves these links. When supplying the URI directly, librespot panics. One of those songs is spotify:track:4mu8svGkGaO2dgAcTlo0FK but there are many more.

XDjackieXD avatar Feb 08 '17 22:02 XDjackieXD

What are you using to load the track ? Some tracks have restrictions which prevent them from being played in certain countries. They however have a list of "alternatives" which can be used instead.

The player includes support for this. If the track is not available, it will use an alternative instead. This is implemented as the find_available_alternative function: https://github.com/plietar/librespot/blob/master/src/player.rs#L165-L191

The track you've listed as an example loads just fine in the player for me (even when bypassing spirc). If you are not using the provided Player but are downloading and decrypting the file manually, you may need a similar logic to find the right file.

plietar avatar Feb 09 '17 00:02 plietar

I did not remove the find alternative from the player and I'm just bypassing spirc (getting the spotify IDs from a FiFo file). This track plays fine on the normal spotify client and it plays fine when using spirc. When printing out the spotify id thta is getting sent by spirc, it correspomds to the same song inside an other album.

XDjackieXD avatar Feb 09 '17 07:02 XDjackieXD