No Spotify playlists appear when connecting #59

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

Comments

3 participants
@jodal
Owner

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

This comment has been minimized.

Show comment Hide comment
@adamcik

adamcik May 5, 2011

Owner

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

Owner

adamcik commented May 5, 2011

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

@bok

This comment has been minimized.

Show comment Hide comment
@bok

bok May 5, 2011

Contributor

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!

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

This comment has been minimized.

Show comment Hide comment
@jodal

jodal Jun 3, 2011

Owner

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

Owner

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

This comment has been minimized.

Show comment Hide comment
@jodal

jodal Jun 7, 2011

Owner

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

Owner

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 Jun 7, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment