From 527a712cbc2bfa14db3f9ad32a1c1299d923e8d7 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Thu, 23 Jul 2020 16:11:00 +0200 Subject: [PATCH] Added check for feat artists inside main artists array This fixed #2 --- deemix/app/downloader.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deemix/app/downloader.py b/deemix/app/downloader.py index 58fea28..fbd15d4 100644 --- a/deemix/app/downloader.py +++ b/deemix/app/downloader.py @@ -291,7 +291,8 @@ def getTrackData(dz, trackAPI_gw, settings, trackAPI=None, albumAPI_gw=None, alb track['album']['artists'].append(artist['name']) if not artist['role'] in track['album']['artist']: track['album']['artist'][artist['role']] = [] - track['album']['artist'][artist['role']].append(artist['name']) + if artist['role'] != "Main" and artist['name'] not in track['album']['artist']['Main']: + track['album']['artist'][artist['role']].append(artist['name']) if settings['removeDuplicateArtists']: track['album']['artists'] = uniqueArray(track['album']['artists']) for role in track['album']['artist'].keys(): @@ -365,7 +366,8 @@ def getTrackData(dz, trackAPI_gw, settings, trackAPI=None, albumAPI_gw=None, alb track['artists'].append(artist['name']) if not artist['role'] in track['artist']: track['artist'][artist['role']] = [] - track['artist'][artist['role']].append(artist['name']) + if artist['role'] != "Main" and artist['name'] not in track['artist']['Main']: + track['artist'][artist['role']].append(artist['name']) if settings['removeDuplicateArtists']: track['artists'] = uniqueArray(track['artists']) for role in track['artist'].keys():