Commit 7dd3a898 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

Fix issue created by commit 57c492

parent 57c49293
...@@ -172,21 +172,20 @@ def _parse_playlist(json_obj, artist=None, artists=None): ...@@ -172,21 +172,20 @@ def _parse_playlist(json_obj, artist=None, artists=None):
return Playlist(**kwargs) return Playlist(**kwargs)
def _parse_track(json_obj, albumarg = None): def _parse_track(json_obj, albumarg = None):
album = None
if 'album' in json_obj:
album = _parse_album(json_obj['album'], artist)
else:
album = albumarg
artist = Artist()
if 'performer' in json_obj: if 'performer' in json_obj:
artist = _parse_artist(json_obj['performer']) artist = _parse_artist(json_obj['performer'])
elif 'artist' in json_obj: elif 'artist' in json_obj:
artist = _parse_artist(json_obj['artist']) artist = _parse_artist(json_obj['artist'])
elif album: elif albumarg and albumarg.artist:
if album.artist: artist = albumarg.artist
artist = album.artist
album = None
if 'album' in json_obj:
album = _parse_album(json_obj['album'], artist)
else: else:
artist = Artist() album = albumarg
available = json_obj['streamable'] if 'streamable' in json_obj else false available = json_obj['streamable'] if 'streamable' in json_obj else false
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment