Skip to content

Instantly share code, notes, and snippets.

@makispl
Created March 7, 2020 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makispl/04497021284fdfb25203d770cf56aa61 to your computer and use it in GitHub Desktop.
Save makispl/04497021284fdfb25203d770cf56aa61 to your computer and use it in GitHub Desktop.
def enrich_playlist(sp, username, playlist_id, playlist_tracks):
index = 0
results = []
while index < len(playlist_tracks):
results += sp.user_playlist_add_tracks(username, playlist_id, tracks = playlist_tracks[index:index + 100])
index += 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment