From a705794a913049cd83c754a4707d9c53ec862196 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Wed, 11 Aug 2021 12:25:11 +0200 Subject: [PATCH] Merge code cleanup --- deemix/plugins/spotify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deemix/plugins/spotify.py b/deemix/plugins/spotify.py index 9b4344f..9dba95e 100644 --- a/deemix/plugins/spotify.py +++ b/deemix/plugins/spotify.py @@ -94,7 +94,7 @@ class Spotify(Plugin): cache['tracks'][link_id] = cachedTrack self.saveCache(cache) - if 'id' in cachedTrack and cachedTrack['id'] != "0": + if cachedTrack.get('id', "0") != "0": return generateTrackItem(dz, cachedTrack['id'], bitrate) raise TrackNotOnDeezer(f"https://open.spotify.com/track/{link_id}") @@ -213,7 +213,7 @@ class Spotify(Plugin): cache['tracks'][track['id']] = cachedTrack self.saveCache(cache) - if 'id' in cachedTrack and cachedTrack['id'] != "0": + if cachedTrack.get('id', "0") != "0": trackAPI = dz.api.get_track(cachedTrack['id']) deezerTrack = None