fixed artist art not downloadin sometimes

This commit is contained in:
RemixDev 2020-03-01 11:56:58 +01:00
parent 4f04887931
commit 3c69c37c11
1 changed files with 1 additions and 1 deletions

View File

@ -294,7 +294,7 @@ def downloadTrackObj(trackAPI, settings, overwriteBitrate=False, extraTrack=None
track['album']['picPathLocal'] = None track['album']['picPathLocal'] = None
# Save artist art # Save artist art
if artistPath: if artistPath:
track['album']['artist']['picUrl'] = "https://cdns-images.dzcdn.net/images/artist/{}/{}x{}-000000-80-0-0.{}".format(track['album']['artist']['pic'], settings['localArtworkSize'], settings['localArtworkSize'], 'png' if settings['PNGcovers'] else 'jpg') track['album']['artist']['picUrl'] = "https://e-cdns-images.dzcdn.net/images/artist/{}/{}x{}-000000-80-0-0.{}".format(track['album']['artist']['pic'], settings['localArtworkSize'], settings['localArtworkSize'], 'png' if settings['PNGcovers'] else 'jpg')
track['album']['artist']['picPathLocal'] = os.path.join(artistPath, f"{settingsRegexArtist(settings['artistImageTemplate'], track['album']['artist'], settings)}.{'png' if settings['PNGcovers'] else 'jpg'}") track['album']['artist']['picPathLocal'] = os.path.join(artistPath, f"{settingsRegexArtist(settings['artistImageTemplate'], track['album']['artist'], settings)}.{'png' if settings['PNGcovers'] else 'jpg'}")
if not os.path.isfile(track['album']['artist']['picPathLocal']): if not os.path.isfile(track['album']['artist']['picPathLocal']):
with open(track['album']['artist']['picPathLocal'], 'wb') as f: with open(track['album']['artist']['picPathLocal'], 'wb') as f: