We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 483b753 commit fe53cf6Copy full SHA for fe53cf6
aw_watcher_spotify/main.py
@@ -35,7 +35,10 @@ def get_current_track(sp) -> Optional[dict]:
35
36
def data_from_track(track: dict, sp) -> dict:
37
song_name = track["item"]["name"]
38
- data = sp.audio_features(track["item"]["id"])[0] or {}
+ # local files do not have IDs
39
+ data = (
40
+ (sp.audio_features(track["item"]["id"])[0] or {}) if track["item"]["id"] else {}
41
+ )
42
data["title"] = song_name
43
data["uri"] = track["item"]["uri"]
44
0 commit comments