Fixed issue where main artist was not saved

This commit is contained in:
RemixDev 2020-07-23 21:14:17 +02:00
parent 10002f3a78
commit f3b36b3ea3
3 changed files with 4 additions and 4 deletions

View File

@ -1,3 +1,3 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
__version__ = "1.1.15" __version__ = "1.1.17"

View File

@ -291,7 +291,7 @@ 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']] = []
if artist['role'] != "Main" and artist['name'] not in track['album']['artist']['Main']: if artist['role'] != "Main" and artist['name'] not in track['album']['artist']['Main'] or artist['role'] == "Main":
track['album']['artist'][artist['role']].append(artist['name']) 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'])
@ -366,7 +366,7 @@ 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']] = []
if artist['role'] != "Main" and artist['name'] not in track['artist']['Main']: if artist['role'] != "Main" and artist['name'] not in track['artist']['Main'] or artist['role'] == "Main":
track['artist'][artist['role']].append(artist['name']) track['artist'][artist['role']].append(artist['name'])
if settings['removeDuplicateArtists']: if settings['removeDuplicateArtists']:
track['artists'] = uniqueArray(track['artists']) track['artists'] = uniqueArray(track['artists'])

View File

@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text()
setup( setup(
name="deemix", name="deemix",
version="1.1.15", version="1.1.17",
description="A barebone deezer downloader library", description="A barebone deezer downloader library",
long_description=README, long_description=README,
long_description_content_type="text/markdown", long_description_content_type="text/markdown",