From ea76463739058d6460ff727c055ae8d5208a60df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sat, 28 Nov 2020 21:32:38 +0100 Subject: [PATCH] minor fix --- src/resources/apiinteractionresource.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resources/apiinteractionresource.py b/src/resources/apiinteractionresource.py index 908c84b..1c71152 100644 --- a/src/resources/apiinteractionresource.py +++ b/src/resources/apiinteractionresource.py @@ -30,10 +30,10 @@ class APIInteractionResource(UserStoreResource): spotify_uri += "artist:" imagedata = spot_data[0]['images'] elif mb_type == "release": - spot_data = self.spotify.search(q=querystring, type="album", limit=1).get('albums') + spot_data = self.spotify.search(q=querystring, type="album", limit=1)['albums']['items'] + print(self.spotify.search(q=querystring, type="album", limit=1)) if not spot_data: return None, None, None - spot_data = spot_data['items'] spotify_uri += "album:" imagedata = spot_data[0]['images'] elif mb_type == "work" or mb_type == "recording":