I know maintaining Spotify search has been an ongoing issue and I saw that in the release notes for 0.7.0RC6 there’s a bullet point stating “Fixed Mopidy-Spotify search”, but I seem to be having some trouble with it on my musicbox. I’ve got no problem searching Spotify via the web interface, but when I use an mpd client (Mopidy Mobile on an android phone) Spotify isn’t listed among the folders that can be searched in the library. Is there a step I’m missing?
Those folders don’t represent what can be searched. They represent what can be browsed. I removed Spotify browsing since it was entirely broken. If you actually search for something it should work, did you try that?
Ah, okay. I used to search Spotify by clicking on the Spotify folder and then searching rather than browsing.
When I search the entire library from Mopidy Mobile I get an error: "Server error: Application error: u’items’ "
And hang on, mopidy mobile is a Web client, not an MPD client, right?
I think you’d need to provide the server logs. Does musicbox-webclient work?
I can reproduce this, I will investigate.
Perhaps I’m misunderstanding you, but I’m using (what I thought was) an Android MPD client app called “Mopidy Mobile” ( https://play.google.com/store/apps/details?id=at.co.kemmer.mopidy_mobile&hl=en_US ). I’m going to feel rather silly if this is just a web interface.
I can give you whatever logs you want, just tell me what to upload.
No need to feel silly, it’s a ‘hybrid app’ done really well so it feels like a native app. https://github.com/tkem/mopidy-mobile
Visiting in my normal browser I found this in the devtools console:
"Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/mopidy/internal/jsonrpc.py", line 133, in _handle_single_request
result = self._unwrap_result(result)
File "/usr/local/lib/python2.7/dist-packages/mopidy/internal/jsonrpc.py", line 222, in _unwrap_result
result = result.get()
File "/usr/local/lib/python2.7/dist-packages/pykka/threading.py", line 52, in get
compat.reraise(*self._data['exc_info'])
File "/usr/local/lib/python2.7/dist-packages/pykka/compat.py", line 12, in reraise
exec('raise tp, value, tb')
File "/usr/local/lib/python2.7/dist-packages/pykka/actor.py", line 201, in _actor_loop
response = self._handle_receive(message)
File "/usr/local/lib/python2.7/dist-packages/pykka/actor.py", line 295, in _handle_receive
return callee(*message['args'], **message['kwargs'])
File "/usr/local/lib/python2.7/dist-packages/mopidy/core/library.py", line 344, in search
result = future.get()
File "/usr/local/lib/python2.7/dist-packages/pykka/threading.py", line 52, in get
compat.reraise(*self._data['exc_info'])
File "/usr/local/lib/python2.7/dist-packages/pykka/compat.py", line 12, in reraise
exec('raise tp, value, tb')
File "/usr/local/lib/python2.7/dist-packages/pykka/actor.py", line 201, in _actor_loop
response = self._handle_receive(message)
File "/usr/local/lib/python2.7/dist-packages/pykka/actor.py", line 295, in _handle_receive
return callee(*message['args'], **message['kwargs'])
File "/usr/local/lib/python2.7/dist-packages/mopidy_youtube/backend.py", line 192, in search
tracks=search_youtube(search_query)
File "/usr/local/lib/python2.7/dist-packages/mopidy_youtube/backend.py", line 102, in search_youtube
playlist = [item['id']['videoId'] for item in data['items']]
KeyError: u'items'
Searching in Mopidy-youtube doesn’t currently work as Google decided to revoke the API key. So disabling this extension is one option. It’s not ideal since other parts Mopidy-Youtube do still work i.e. playing from a youtube URL.
Another option is to revert part of what I did to hide the (broken) Spotify browsing. I didn’t realise this was used by Mopidy-Mobile as a means to limit the search to a particular backend. In musicbox-webclient we let the user explicitly select which backend they want to search from.
Disabling the youtube extension turns out to be a perfectly fine solution for me since I almost never use it. (I’ve never actually had success getting mopidy-youtube to play audio from a youtube video, but I’ve never put much effort into investigating why.)
Thank you for the insight into how Mopidy Mobile actually works! Since your reply I’ve had great fun discovering how to unlock the potential of actual MPD clients in conjunction with the musicbox!
I’m not sure what the current state of mpd client support is. Mopidy’s implementing of the MPD protocol isn’t brilliant, which depending on your particular client, can cause some headaches. Some do work OK but personally find the webclients provide a much better user experience. YMMV.