Skip to content

Commit

Permalink
Handle none type (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
zodihax authored Dec 12, 2024
1 parent efc7547 commit 43515a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ultrasonics/official_plugins/up_spotify.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ def saved_songs_add(self, spotify_ids):
songs_dict = []

for playlist in playlists:
if not isinstance(playlist, dict) or playlist.get("name") is None or playlist.get("id") is None:
continue

item = {"name": playlist["name"], "id": {"spotify": playlist["id"]}}

songs_dict.append(item)
Expand Down

0 comments on commit 43515a0

Please sign in to comment.