From 19dd74873f90643cebef793aa715b7f0741047e1 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Thu, 23 Apr 2020 14:12:27 +0200 Subject: [PATCH] Fixed download of albums with no cover art --- deemix/app/queuemanager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deemix/app/queuemanager.py b/deemix/app/queuemanager.py index 5794b6b..f27ec80 100644 --- a/deemix/app/queuemanager.py +++ b/deemix/app/queuemanager.py @@ -71,7 +71,10 @@ def generateQueueItem(dz, sp, url, settings, bitrate=None, albumAPI=None, interf result['title'] = albumAPI['title'] result['artist'] = albumAPI['artist']['name'] - result['cover'] = albumAPI['cover_small'][:-24] + '/75x75-000000-80-0-0.jpg' + if albumAPI['cover_small'] != None: + result['cover'] = albumAPI['cover_small'][:-24] + '/75x75-000000-80-0-0.jpg' + else: + result['cover'] = f"https://e-cdns-images.dzcdn.net/images/cover/{albumAPI_gw['ALB_PICTURE']}/75x75-000000-80-0-0.jpg" result['size'] = albumAPI['nb_tracks'] result['downloaded'] = 0 result['failed'] = 0