From 2f1985a42b6b356cdf2358bc126a60b1492ac357 Mon Sep 17 00:00:00 2001 From: Tim Rae Date: Wed, 4 Dec 2024 05:46:30 +0900 Subject: [PATCH] Check for null playlists in filter --- src/spotify_to_tidal/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spotify_to_tidal/sync.py b/src/spotify_to_tidal/sync.py index a60914f..1f2e403 100755 --- a/src/spotify_to_tidal/sync.py +++ b/src/spotify_to_tidal/sync.py @@ -387,7 +387,7 @@ async def get_playlists_from_spotify(spotify_session: spotipy.Spotify, config): playlists.extend([p for p in extra_result['items']]) # filter out playlists that don't belong to us or are on the exclude list - my_playlist_filter = lambda p: p['owner']['id'] == user_id + my_playlist_filter = lambda p: p and p['owner']['id'] == user_id exclude_filter = lambda p: not p['id'] in exclude_list return list(filter( exclude_filter, filter( my_playlist_filter, playlists )))