Uploaded image for project: 'ListenBrainz'
  1. ListenBrainz
  2. LB-1294

Import user's loved tracks from Spotify

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • None
    • None

      It would be great to import a Spotify user's loved tracks.

      Spotipy has a method for this (current_user_saved_tracks) so it shouldn't be too tricky to fetch them at least: https://spotipy.readthedocs.io/en/2.22.1/?highlight=current_user_saved_tracks#spotipy.client.Spotify.current_user_saved_tracks

      However the Spotify API endpoint has a limit of 50 tracks at a time, with an offset property.
      So we will need to fetch them 50 by 50 until we get all the tracks (the endpoint response also contains a total count, conveniently).
      https://developer.spotify.com/documentation/web-api/reference/get-users-saved-tracks

            Unassigned Unassigned
            mr_monkey Monkey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package