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,7 +291,8 @@ def getTrackData(dz, trackAPI_gw, settings, trackAPI=None, albumAPI_gw=None, alb
track['album']['artists'].append(artist['name']) track['album']['artists'].append(artist['name'])
if not artist['role'] in track['album']['artist']: if not artist['role'] in track['album']['artist']:
track['album']['artist'][artist['role']] = [] 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']: if settings['removeDuplicateArtists']:
track['album']['artists'] = uniqueArray(track['album']['artists']) track['album']['artists'] = uniqueArray(track['album']['artists'])
for role in track['album']['artist'].keys(): 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']) track['artists'].append(artist['name'])
if not artist['role'] in track['artist']: if not artist['role'] in track['artist']:
track['artist'][artist['role']] = [] 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']: if settings['removeDuplicateArtists']:
track['artists'] = uniqueArray(track['artists']) track['artists'] = uniqueArray(track['artists'])
for role in track['artist'].keys(): for role in track['artist'].keys():