fixed exception while mapping track if title version is missing

This commit is contained in:
uh wot 2022-01-04 19:20:20 +01:00
parent 7b584f63b3
commit cf1be5d3aa
No known key found for this signature in database
GPG key ID: CB2454984587B781

View file

@ -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()