Spotify Search don´t work


#1

Hi everyone,

Yesterday the Spotify search function works like a charm but today it sasy “No tracks found”

Here are the logs, may they can help

Thanks for your answer!

2017-12-21 17:01:39,030 DEBUG [3055:SpotifyBackend-10] mopidy_spotify.library: Spotify search query: martin garrix
2017-12-21 17:01:39,071 DEBUG [3055:Dummy-12] mopidy_spotify.session_manager: System message: 17:01:39.070 E [ap:4210] ChannelError(0, 1, search)
2017-12-21 17:01:39,095 DEBUG [3055:HttpServer] mopidy.http.handlers: Sent WebSocket message to 192.168.178.53: '{“jsonrpc”: “2.0”, “id”: 18, “result”: [{“model”: “SearchResult”, “uri”: “spotify:search:martin%20garrix”}]}'
2017-12-21 17:01:41,111 DEBUG [3055:SpotifyThread] mopidy_spotify.playlist_manager: Callback called: The state of playlist “” changed


#2

I can confirm this. Oh dear, they (Spotify) broke it again.


#3

Are there any news from spotify that they are aware and will fix it?


#4

I’ve not tried it myself over Christmas but can I take it that it’s still
broken? Spotify stopped supporting this library so I don’t expect them to
fix it anytime soon. We can fix it ourselves by using their other API like
in the latest version of Mopidy. That API is more awkward but at least it
works and is supported.


#5

Thank you for your reply and support.
Yes, on my musicbox installation search on spotify is still not working.
Will you post how to fix it with their other API.
Thank’s in advance.


#6

So looking at what I did before for this I am reminded why this is no longer straight-forward. The other API (Spotify’s Web API) changed to now require additional authentication; the code for that is part of the latest mopidy-spotify release but it’s a bit of work to back-port it to the old version pimusicbox still uses. When I looked at it previously, it didn’t seem worth it - any time would be better spent updating the whole system to the latest versions. I can understand that Spotify without search might be useless for some people but I am surprised to not have had more reports of this problem. I will look again at what’s required for the back-port.


#7

For whatever it’s worth, I hadn’t reported anything because I saw that it had already been raised in this thread. Spotify Search was the primary means by which we used our two pimusicboxes, so the loss of this functionality has indeed made our musicboxes relatively useless. Thanks for checking into what’s involved in back-porting a fix, and if it turns out that it’s more efficient to just update the whole system to the latest version I can completely understand.


#8

@briho and/or @joda

Could you try this version that I’ve hacked the OAuth Web API functionality into:

pip install --no-deps --upgrade https://github.com/pimusicbox/mopidy-spotify/zipball/backport-oauth

Then go to https://www.mopidy.com/authenticate/#spotify, click the button to authenticate with Spotify and copy the client_id and client_secret that it gives you to the [spotify] section of /boot/config/settings.ini so it’ll end up looking something like this:

# -----------
# | Spotify |
# -----------
# https://github.com/mopidy/mopidy-spotify
[spotify]
# Supply your PREMIUM account credentials to enable Spotify
enabled = true
username = YOUR_USERNAME_HERE
password = YOUR_PASSWORD_HERE
client_id = OBTAINED_FROM_MOPIDY_AUTH_WEBPAGE
client_secret = ALSO_OBTAINED_FROM_MOPIDY_AUTH_WEBPAGE
# The bitrate, the quality of the music played by Spotify, can be set to 96, 160 (default) or 320
bitrate = 320
cache_dir = ""

Finally, restart Mopidy with service mopidy restart and try searching.


#9

Search works like a charm again. Thanks for the quick fix. Only problem now is that all my spotify playlists are no longer there. My credentials should be fine as I can search and play music from spotify. Unfortunately the playlists are no longer listed, only the “Musicbox Favourites” is still there.


#10

Oh dear. I must admit I didn’t even check the playlists when I was hacking this up. Will try again tomorrow.


#11

I did not change anything but the Paylists are back and Search is still working. Thank you for the fix


#12

If you didn’t change anything then it wasn’t my fix. Just my luck they fix it the day after I do the workaround. Grr


#13

But I’ll leave the fixed version up. They will break it again real soon I am sure.

They also break it for the many roku users out there with these kind of issues. But I’ve just discovered they are “fixing” that by pulling their Roku app entirely! In fact, they are pulling Spotify support from all kinds of older devices. Presumably they all use libspotify and this is another step towards killing it. https://support.spotify.com/uk/article/why-cant-i-use-the-spotify-app-on-my-tv/


#14

Fixed the playlists too. Just run the same as before to get the latest version.

pip install --no-deps --upgrade https://github.com/pimusicbox/mopidy-spotify/zipball/backport-oauth

I will roll a new release containing this and updated firmware. And that’ll be v0.7.0.


#15

Outstanding, that seems to have done the trick.

(Just out of curiosity – do I need to worry about the SNIMissingWarning and so on warnings?)


#16

No, you can ignore that here.