Force JPG images on missing artist art, PNG is not available
This fixes #9
This commit is contained in:
parent
c0dee07010
commit
ae0a1ed429
|
@ -683,11 +683,17 @@ def downloadTrackObj(dz, trackAPI, settings, bitrate, queueItem, extraTrack=None
|
||||||
|
|
||||||
# Save artist art
|
# Save artist art
|
||||||
if artistPath:
|
if artistPath:
|
||||||
result['artistURL'] = "https://e-cdns-images.dzcdn.net/images/artist/{}/{}x{}-{}".format(
|
if track['album']['mainArtist']['pic'] != "":
|
||||||
track['album']['mainArtist']['pic'], settings['localArtworkSize'], settings['localArtworkSize'],
|
result['artistURL'] = "https://e-cdns-images.dzcdn.net/images/artist/{}/{}x{}-{}".format(
|
||||||
'none-100-0-0.png' if settings['PNGcovers'] else f'000000-{settings["jpegImageQuality"]}-0-0.jpg')
|
track['album']['mainArtist']['pic'], settings['localArtworkSize'], settings['localArtworkSize'],
|
||||||
result['artistPath'] = os.path.join(artistPath,
|
'none-100-0-0.png' if settings['PNGcovers'] else f'000000-{settings["jpegImageQuality"]}-0-0.jpg')
|
||||||
f"{settingsRegexArtist(settings['artistImageTemplate'], track['album']['mainArtist'], settings)}.{'png' if settings['PNGcovers'] else 'jpg'}")
|
result['artistPath'] = os.path.join(artistPath,
|
||||||
|
f"{settingsRegexArtist(settings['artistImageTemplate'], track['album']['mainArtist'], settings)}.{'png' if settings['PNGcovers'] else 'jpg'}")
|
||||||
|
else:
|
||||||
|
result['artistURL'] = "https://e-cdns-images.dzcdn.net/images/artist//{}x{}-{}".format(
|
||||||
|
settings['localArtworkSize'], settings['localArtworkSize'], f'000000-{settings["jpegImageQuality"]}-0-0.jpg')
|
||||||
|
result['artistPath'] = os.path.join(artistPath,
|
||||||
|
f"{settingsRegexArtist(settings['artistImageTemplate'], track['album']['mainArtist'], settings)}.jpg")
|
||||||
|
|
||||||
# Data for m3u file
|
# Data for m3u file
|
||||||
if extrasPath:
|
if extrasPath:
|
||||||
|
|
Loading…
Reference in New Issue