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

No Spotify playlists appear when connecting #59

Closed
jodal opened this issue Jan 19, 2011 · 4 comments
Closed

No Spotify playlists appear when connecting #59

jodal opened this issue Jan 19, 2011 · 4 comments
Labels
C-bug Category: This is a bug
Milestone

Comments

@jodal
Copy link
Member

jodal commented Jan 19, 2011

Symptoms

Since the upgrade to libspotify 0.0.6, as required by Mopidy 0.3, Spotify playlists have not been available when connecting to a freshly started Mopidy instance.

Workaround

The current workaround is as follows:

  1. Execute a search for anything that yields some hits. "foo" will do. If you can choose search type, choose "any" or "query", not "filename".
  2. Disconnect your client from Mopidy, and then connect again.
  3. You should now see your Spotify playlists. If not, wait for say 10 seconds, and reconnect again.

If you use an MPD client with broken search capabilities, like Sonata or MPoD, use another client for executing the workaround, and then continue using your preferred client. You will not need to redo the workaround as long as Mopidy is not restarted.

Technical details

In libspotify 0.0.4, the metadata_updated callback was called for a bunch of events, including when the libspotify stored playlist container was done loading its contents. Mopidy reloads its internal copy of the stored playlists whenever the callback is called.

In libspotify 0.0.6, the metadata_updated callback is no longer called when the playlist container is done loading. Instead the playlist containers have gotten their own set of callbacks, including one named container_loaded. This is the callback we should now be listening for, and when called we should update our internal copy of the stored playlists. Currently, pyspotify, the Python bindings for libspotify, does not implement the new playlist container callbacks.

The workaround works because metadata_updated is called when search results are received, which will trigger the refreshing of Mopidy's internal copy of the Spotify playlists. If you are too quick executing the workaround, it may not work because the libspotify playlist container wasn't ready yet when your search hits returned.

@adamcik
Copy link
Member

adamcik commented May 5, 2011

Any progress on this, any thing we can do within pyspotiy improvements that have been made?

@bok
Copy link
Contributor

bok commented May 5, 2011

I've just finished a rewriting of the playlist callbacks subsystem inside pyspotify ; I will use it as a basis to implement playlistcontainer callbacks. They should arrive soon!

@jodal
Copy link
Member Author

jodal commented Jun 3, 2011

With the upcoming 1.2 release of pyspotify and the patch in @bok's fix-59 branch, this bug should be fixed.

@jodal
Copy link
Member Author

jodal commented Jun 7, 2011

pyspotify 1.2 has been released, and is now required by Mopidy. The fix-59 branch from @bok has been merged. Stuff works! :-)

@jodal jodal closed this as completed Jun 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants