From d234ce09d75a568f42d44953333d6b7bb2297cc8 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Tue, 29 Dec 2020 22:25:03 +0100 Subject: [PATCH] Fixed artist related issues --- deemix/app/track.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deemix/app/track.py b/deemix/app/track.py index eb6a8e9..bcf35ac 100644 --- a/deemix/app/track.py +++ b/deemix/app/track.py @@ -114,6 +114,7 @@ class Track: self.album['label'] = "Unknown" self.album['mainArtist'] = self.mainArtist self.album['mainArtist']['isVariousArtists'] = False + self.album['variousArtists'] = None self.album['rootArtist'] = None self.album['recordType'] = "album" self.album['trackTotal'] = "0" @@ -209,6 +210,7 @@ class Track: except APIError: albumAPI = None + self.album['variousArtists'] = None if albumAPI: self.album['title'] = albumAPI['title'] @@ -227,9 +229,8 @@ class Track: } self.album['rootArtist'] = albumAPI.get('root_artist', None) - self.album['artist'] = {} + self.album['artist'] = {'Main': []} self.album['artists'] = [] - self.album['variousArtists'] = None for artist in albumAPI['contributors']: isVariousArtists = artist['id'] == VARIOUS_ARTISTS isMainArtist = artist['role'] == "Main" @@ -332,7 +333,7 @@ class Track: if not self.discNumber: self.discNumber = trackAPI['disk_number'] - self.artist = {} + self.artist = {'Main': []} self.artists = [] for artist in trackAPI['contributors']: isVariousArtists = artist['id'] == VARIOUS_ARTISTS