Returning flat representation for artist and renamed 'name' attribute for consistency with the mpd backend

This commit is contained in:
Fabio Manganiello 2019-02-12 23:24:16 +01:00
parent 1c4edf93bf
commit 77a76370a5
1 changed files with 5 additions and 1 deletions

View File

@ -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']