From cf1be5d3aafdd14ede3d831545e16506461edc06 Mon Sep 17 00:00:00 2001 From: uh wot Date: Tue, 4 Jan 2022 19:20:20 +0100 Subject: [PATCH] fixed exception while mapping track if title version is missing --- deezer/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deezer/utils.py b/deezer/utils.py index 0b5da78..b0db0ef 100644 --- a/deezer/utils.py +++ b/deezer/utils.py @@ -359,7 +359,7 @@ def map_track(track): 'track_token_expire': track['TRACK_TOKEN_EXPIRE'] } if int(track['SNG_ID']) > 0: - result['title_version'] = track.get('VERSION').strip() + result['title_version'] = track.get('VERSION', "").strip() if result['title_version'] != "" and result['title_version'] in result['title_short']: result['title_short'] = result['title_short'].replace(result['title_version'], "").strip() result['title'] = f"{result['title_short']} {result['title_version']}".strip()