I am using mopidy with Iris since many months, with no issues. Today I tried to use mopidy’s API with json RPC and I found that I am able to add and play any track except spotify’s playlists.
For any spotify playlist I get this error in log:
2019-07-12 13:27:26,564 INFO [3731:SpotifyBackend-8] mopidy_spotify.lookup: Failed to lookup "spotify:playlist:37i9dQZF1E4kZJksQ28QcL": Failed to get link from Spotify URI: u'spotify:playlist:37i9dQZF1E4kZJksQ28QcL'
I also tried, in Iris, to copy the playlist uri and paste it in “Add Uri”, but I am getting the same result.
If I normally click on “Play” on the playlist, it plays fine.
Any hint?
Ciao Fabio,
Could you please try to add the same URL in the following format?
spotify:user:spotify:playlist:37i9dQZF1E4kZJksQ28QcL
Spotify has been definitely schizophrenic about the preferred format for playlist URLs, jumping between spotify:playlist:*
and spotify:user:*:playlist:*
multiple times already, without proper notice to the developers and without seeming to care much of breaking downstream integrations. I have already changed once the logic in my fork when they went from spotify:user:*:playlist:*
back to spotify:playlist:*
, but now they seem to have changed their mind again. Until they make up their minds (or hire more mentally stable project managers), the thumb rule remains “if one format doesn’t work, just try the other one - you never know what runs in Spotify’s mind today”.
Ciao!
I am afraid it is more complex than that:
2019-07-15 17:33:34,338 INFO [491:SpotifyBackend-8] mopidy_spotify.lookup: Failed to lookup "spotify:user:playlist:37i9dQZF1DWTUrBSnMwPML": Failed to get link from Spotify URI: u'spotify:user:playlist:37i9dQZF1DWTUrBSnMwPML'
I have updated mopidy to v. 2.2.3, but the bug is still there:
curl -X POST -H Content-Type:application/json -d '{ "method": "core.tracklist.add", "jsonrpc": "2.0", "params":{ "uri": "spotify:user:playlist:37i9dQZF1DWTUrBSnMwPML" }, "id": 1 }' http://192.168.1.59:6680/mopidy/rpc
in the log:
2019-07-17 16:43:53,770 INFO [6979:SpotifyBackend-9] mopidy_spotify.lookup: Failed to lookup "spotify:user:playlist:37i9dQZF1DWTUrBSnMwPML": Failed to get link from Spotify URI: u'spotify:user:playlist:37i9dQZF1DWTUrBSnMwPML'
This is a pity, as I would have liked to setup a cronjob to launch random playlists during the morning, at wake-up…