From 8c1dfe63d05754c1f5491d8e6632e5f0361ee2ee Mon Sep 17 00:00:00 2001 From: RemixDev Date: Fri, 12 Jun 2020 13:15:59 +0200 Subject: [PATCH] Change cover download timeout to generic timeout --- deemix/app/downloader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deemix/app/downloader.py b/deemix/app/downloader.py index 1a4a279..5eede14 100644 --- a/deemix/app/downloader.py +++ b/deemix/app/downloader.py @@ -95,9 +95,6 @@ def downloadImage(url, path, overwrite="n"): f.write(image.content) chmod(path, 0o770) return path - except ConnectionError: - sleep(1) - return downloadImage(url, path, overwrite) except HTTPError: if 'cdns-images.dzcdn.net' in url: urlBase = url[:url.rfind("/")+1] @@ -108,6 +105,9 @@ def downloadImage(url, path, overwrite="n"): sleep(1) return downloadImage(urlBase+pictureUrl.replace(str(pictureSize)+"x"+str(pictureSize), '1400x1400'), path, overwrite) logger.error("Couldn't download Image: "+url) + except: + sleep(1) + return downloadImage(url, path, overwrite) remove(path) return None else: