From eddf217096107e718933e5ddd939877d04f5b001 Mon Sep 17 00:00:00 2001 From: Jamie Quigley Date: Thu, 30 Apr 2020 21:52:18 +0100 Subject: [PATCH] Included api response in exception for failed api calls --- deemix/api/deezer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deemix/api/deezer.py b/deemix/api/deezer.py index 8259ed4..c74598c 100755 --- a/deemix/api/deezer.py +++ b/deemix/api/deezer.py @@ -87,7 +87,7 @@ class Deezer: time.sleep(2) return self.api_call(method, args) if 'error' in result_json.keys(): - raise APIError() + raise APIError(result_json) return result_json def login(self, email, password, re_captcha_token): @@ -231,7 +231,7 @@ class Deezer: top_result['nb_song'] = orig_top_result['NUMBER_TRACK'] elif top_result['type'] == 'playlist': top_result['id'] = orig_top_result['PLAYLIST_ID'] - top_result['picture'] = 'https://e-cdns-images.dzcdn.net/images/'+ orig_top_result['PICTURE_TYPE'] +'/' + orig_top_result['PLAYLIST_PICTURE'] + top_result['picture'] = 'https://e-cdns-images.dzcdn.net/images/' + orig_top_result['PICTURE_TYPE'] + '/' + orig_top_result['PLAYLIST_PICTURE'] top_result['title'] = orig_top_result['TITLE'] top_result['artist'] = orig_top_result['PARENT_USERNAME'] top_result['nb_song'] = orig_top_result['NB_SONG']