mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
Fix KeyError when a track isn't found on Spotify
Ids only exist for Spotify URIs. Regression caused by #568. Fixes #649.
This commit is contained in:
@@ -93,7 +93,10 @@ def format_string(
|
||||
format_tags[9] = tags["track_number"]
|
||||
format_tags[10] = tags["total_tracks"]
|
||||
format_tags[11] = tags["external_ids"]["isrc"]
|
||||
format_tags[12] = tags["id"]
|
||||
try:
|
||||
format_tags[12] = tags["id"]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
format_tags_sanitized = {
|
||||
k: sanitize_title(str(v), ok="'-_()[]{}") if slugification else str(v)
|
||||
|
||||
Reference in New Issue
Block a user