From d5d5f646266fe81fe33344ae8b00ae8c374140ef Mon Sep 17 00:00:00 2001 From: sigma67 Date: Sun, 9 Apr 2023 21:31:48 +0200 Subject: [PATCH] update: add wait between remove and add to avoid 409 conflict response --- spotify_to_ytmusic/controllers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spotify_to_ytmusic/controllers.py b/spotify_to_ytmusic/controllers.py index 3c2b0c2..8f84880 100644 --- a/spotify_to_ytmusic/controllers.py +++ b/spotify_to_ytmusic/controllers.py @@ -1,3 +1,4 @@ +import time from datetime import datetime from spotify_to_ytmusic.setup import setup as setup_func @@ -68,6 +69,7 @@ def update(args): videoIds = ytmusic.search_songs(playlist["tracks"]) if not args.append: ytmusic.remove_songs(playlistId) + time.sleep(2) ytmusic.add_playlist_items(playlistId, videoIds)