Adds 'Starred' playlist to the playlist catalog

Related to issue #326
This commit is contained in:
Thomas Refis 2013-04-01 17:56:05 +02:00
parent a52ae2091b
commit 211b20c496
2 changed files with 2 additions and 3 deletions

View File

@ -169,6 +169,7 @@ class SpotifySessionManager(process.BaseThread, PyspotifySessionManager):
return
playlists = map(
translator.to_mopidy_playlist, self.session.playlist_container())
playlists.append(translator.to_mopidy_playlist(self.session.starred()))
playlists = filter(None, playlists)
self.backend.playlists.playlists = playlists
logger.info('Loaded %d Spotify playlist(s)', len(playlists))

View File

@ -72,9 +72,7 @@ def to_mopidy_playlist(spotify_playlist):
return Playlist(uri=uri, name='[loading...]')
name = spotify_playlist.name()
if not name:
# Other user's "starred" playlists isn't handled properly by pyspotify
# See https://github.com/mopidy/pyspotify/issues/81
return
name = "Starred"
if spotify_playlist.owner().canonical_name() != settings.SPOTIFY_USERNAME:
name += ' by ' + spotify_playlist.owner().canonical_name()
return Playlist(