Skip to content

Commit

Permalink
- use path separators instead of square brackets
Browse files Browse the repository at this point in the history
- use generator expression instead of list comprehension
- fix bug for empty but not None list of folders
  • Loading branch information
alzeih committed Jul 28, 2013
1 parent c58de5a commit c4dcef8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mopidy/backends/spotify/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def to_mopidy_playlist(spotify_playlist, spotify_folders, bitrate=None, username
if not spotify_playlist.is_loaded():
return Playlist(uri=uri, name='[loading...]')
name = spotify_playlist.name()
if spotify_folders is not None:
folder_names = unicode.join('', ['[' + folder.name() + ']' for folder in spotify_folders])
name = folder_names + ' ' + name
if spotify_folders:
folder_names = '/'.join(folder.name() for folder in spotify_folders)
name = folder_names + '/' + name
tracks = [
to_mopidy_track(spotify_track, bitrate=bitrate)
for spotify_track in spotify_playlist
Expand Down

0 comments on commit c4dcef8

Please sign in to comment.