From a09fcf661a94e528b2de9803a06d0ed6d33073dd Mon Sep 17 00:00:00 2001 From: RemixDev Date: Sun, 12 Apr 2020 11:54:33 +0200 Subject: [PATCH] Fixed generic error --- deemix/app/downloader.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/deemix/app/downloader.py b/deemix/app/downloader.py index 6ce4102..482032d 100644 --- a/deemix/app/downloader.py +++ b/deemix/app/downloader.py @@ -571,11 +571,12 @@ def downloadTrackObj_wrap(dz, track, settings, bitrate, queueItem, socket): result = downloadTrackObj(dz, track, settings, bitrate, queueItem, socket=socket) except Exception as e: result = {'error': { - 'message': str(e)}, - 'data': { - 'id': track['SNG_ID'], - 'title': track['SNG_TITLE'] + (" "+track['VERSION'] if 'VERSION' in track and track['VERSION'] else ""), - 'mainArtist': {'name': track['ART_NAME']} + 'message': str(e), + 'data': { + 'id': track['SNG_ID'], + 'title': track['SNG_TITLE'] + (" "+track['VERSION'] if 'VERSION' in track and track['VERSION'] else ""), + 'mainArtist': {'name': track['ART_NAME']} + } } } return result @@ -591,11 +592,12 @@ def download(dz, queueItem, socket=None): result = downloadTrackObj(dz, queueItem['single'], settings, bitrate, queueItem, socket=socket) except Exception as e: result = {'error': { - 'message': str(e)}, - 'data': { - 'id': track['SNG_ID'], - 'title': track['SNG_TITLE'] + (" "+track['VERSION'] if 'VERSION' in track and track['VERSION'] else ""), - 'mainArtist': {'name': track['ART_NAME']} + 'message': str(e), + 'data': { + 'id': track['SNG_ID'], + 'title': track['SNG_TITLE'] + (" "+track['VERSION'] if 'VERSION' in track and track['VERSION'] else ""), + 'mainArtist': {'name': track['ART_NAME']} + } } } download_path = after_download_single(result, settings)