From ecc642ba7d4e15415e7f6dcb0056f208ba5a3f7e Mon Sep 17 00:00:00 2001 From: Adria Jimenez Date: Thu, 6 Jun 2024 18:12:40 +0800 Subject: [PATCH] fix: sync first playlists page This commit: https://github.com/spotify2tidal/spotify_to_tidal/commit/1e8366a0e8e751186dc9d630ddce29e5fb7fa95f broke the loading of playlists. The first results coming back from the Spotify API were not being added to the playlists array. --- src/spotify_to_tidal/sync.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/spotify_to_tidal/sync.py b/src/spotify_to_tidal/sync.py index 27b9766..8b07835 100755 --- a/src/spotify_to_tidal/sync.py +++ b/src/spotify_to_tidal/sync.py @@ -296,6 +296,7 @@ async def get_playlists_from_spotify(spotify_session: spotipy.Spotify, config): print("Loading Spotify playlists") results = spotify_session.user_playlists(config['spotify']['username']) exclude_list = set([x.split(':')[-1] for x in config.get('excluded_playlists', [])]) + playlists.extend([p for p in results['items'] if p['owner']['id'] == config['spotify']['username'] and not p['id'] in exclude_list]) # get all the remaining playlists in parallel if results['next']: