Returning flat representation for artist and renamed 'name' attribute for consistency with the mpd backend
This commit is contained in:
parent
1c4edf93bf
commit
77a76370a5
1 changed files with 5 additions and 1 deletions
|
@ -57,9 +57,13 @@ class MusicMopidyBackend(Backend):
|
|||
del conv_track['uri']
|
||||
|
||||
if 'artists' in conv_track:
|
||||
conv_track['artist'] = conv_track['artists'][0]
|
||||
conv_track['artist'] = conv_track['artists'][0].get('name')
|
||||
del conv_track['artists']
|
||||
|
||||
if 'name' in conv_track:
|
||||
conv_track['title'] = conv_track['name']
|
||||
del conv_track['name']
|
||||
|
||||
if 'album' in conv_track:
|
||||
conv_track['album'] = conv_track['album']['name']
|
||||
|
||||
|
|
Loading…
Reference in a new issue