Reverse the list of tracks in the Starred playlist.
As it is in reverse order from the "official" spotify client.
This commit is contained in:
parent
211b20c496
commit
5982d1059c
@ -71,14 +71,19 @@ def to_mopidy_playlist(spotify_playlist):
|
||||
if not spotify_playlist.is_loaded():
|
||||
return Playlist(uri=uri, name='[loading...]')
|
||||
name = spotify_playlist.name()
|
||||
tracks=[
|
||||
to_mopidy_track(spotify_track)
|
||||
for spotify_track in spotify_playlist
|
||||
if not spotify_track.is_local()
|
||||
]
|
||||
if not name:
|
||||
name = "Starred"
|
||||
# Tracks in the Starred playlist are in reverse order from the official
|
||||
# client.
|
||||
tracks.reverse()
|
||||
if spotify_playlist.owner().canonical_name() != settings.SPOTIFY_USERNAME:
|
||||
name += ' by ' + spotify_playlist.owner().canonical_name()
|
||||
return Playlist(
|
||||
uri=uri,
|
||||
name=name,
|
||||
tracks=[
|
||||
to_mopidy_track(spotify_track)
|
||||
for spotify_track in spotify_playlist
|
||||
if not spotify_track.is_local()])
|
||||
tracks=tracks)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user