From 9f90103b6d01da10566bac475041874f8626fa09 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Fri, 25 Sep 2020 18:10:47 +0200 Subject: [PATCH] Fixed spotify conversion error --- deemix/app/spotifyhelper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deemix/app/spotifyhelper.py b/deemix/app/spotifyhelper.py index f86b2c1..01a19a9 100644 --- a/deemix/app/spotifyhelper.py +++ b/deemix/app/spotifyhelper.py @@ -149,8 +149,11 @@ class SpotifyHelper: else: cache = {'tracks': {}, 'albums': {}} if str(track_id) in cache['tracks']: + dz_track = None if cache['tracks'][str(track_id)]['isrc']: dz_track = dz.get_track_by_ISRC(cache['tracks'][str(track_id)]['isrc']) + dz_id = dz_track['id'] if 'id' in dz_track and 'title' in dz_track else "0" + cache['tracks'][str(track_id)]['id'] = dz_id return (cache['tracks'][str(track_id)]['id'], dz_track, cache['tracks'][str(track_id)]['isrc']) singleTrack = True spotify_track = self.sp.track(track_id)