Added check for feat artists inside main artists array

This fixed #2
This commit is contained in:
RemixDev 2020-07-23 16:11:00 +02:00
parent 267b7e4fa8
commit 527a712cbc
1 changed files with 4 additions and 2 deletions

View File

@ -291,6 +291,7 @@ 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']] = []
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'])
@ -365,6 +366,7 @@ 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']] = []
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'])