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

Add option to import liked songs from Spotify.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • 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
            ishaanshah Ishaan Shah
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Version Package