Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

musicbox-webclient sends null/undefined to lookup in mopidy #213

Closed
maweki opened this issue Nov 25, 2016 · 4 comments
Closed

musicbox-webclient sends null/undefined to lookup in mopidy #213

maweki opened this issue Nov 25, 2016 · 4 comments

Comments

@maweki
Copy link

maweki commented Nov 25, 2016

So I am running mopidy 2.0.1 and the current version of the musicbox-webclient from pip (it would be nice if there was a way to see the version somewhere, maybe a meta-tag).

I have a few files from the local provider. If I search for one, and then say "Search for Artist", the following shows up in the mopidy debug stream:

Received WebSocket message from 192.168.1.11: u'{"method":"core.library.lookup","params":{"uris":["undefined"]},"jsonrpc":"2.0","id":58}

If I want to show the album the following happens: Received WebSocket message from 192.168.1.11: u'{"method":"core.library.lookup","params":{"uris":[null]},"jsonrpc":"2.0","id":38}'

Even though Album Name and Artist Name show up correctly:

bildschirmfoto von 2016-11-25 17-55-54

@maweki
Copy link
Author

maweki commented Nov 25, 2016

bildschirmfoto von 2016-11-25 18-01-13

That seems like one of the problems

@jcass77
Copy link
Member

jcass77 commented Nov 26, 2016

I'm not sure I follow what the exact sequence of steps are to reproduce this issue.

Could you elaborate on what is meant with:

If I search for one, and then say "Search for Artist"

What happens if you click on the 'Show Album...' or 'Show Artist...' links in the queue popup menu? Does the problem only occur when searching, or also if you browse to the track and then open the popup menu?

@maweki
Copy link
Author

maweki commented Nov 26, 2016

What happens if you click on the 'Show Album...' or 'Show Artist...' links in the queue popup menu?

The UI is stuck until you do something else.

I solved it and apparently the webclient doesn't work with the json local backend and only with the sqlite backend. If you use the json-backend, any "Show Album" and "Show Artist" send empty urls to the mopidy-interface, which results in an errormessage in response that results in the UI being stuck.

I think if the artist/album url are undefined/null then the "show Album"/"Show Artist" buttons shouldn't be there or of there's a way to check which local-plugin is in use, it would be nice to show somewhere, that the json-variant is not fully supported.

@jcass77
Copy link
Member

jcass77 commented Nov 27, 2016

I've taken a quick glance at the code and it looks like, when doing mopidy local scan, Mopidy will retrieve the tag containing the artist and album names from the relevant audio file.

This is what is available as part of the built-in json local backend.

mopidy-local-sqlite, on the other hand, appears to do some additional lookups when searching for tracks that then also ads the URI of the relevant artist or album to the track.

As far as I know, the Mopidy project intends to switch to mopidy-local-sqlite as the standard local back-end at some point, so until then we can probably just hide the 'Show....' links in the popup if the URI's are not provided by the backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants