Skip to content

Commit

Permalink
update: add wait between remove and add to avoid 409 conflict response
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Apr 9, 2023
1 parent df2517c commit d5d5f64
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spotify_to_ytmusic/controllers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import time
from datetime import datetime

from spotify_to_ytmusic.setup import setup as setup_func
Expand Down Expand Up @@ -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)


Expand Down

0 comments on commit d5d5f64

Please sign in to comment.