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

      Hi! I started working on a feature to let users import their Spotify playlists directly into LB. For now I think its better to try with Spotify first, and then later add other music services like SoundCloud, Apple Music (mybe will add to GSoC proposal too).

      Also, I noticed that there is some similar ticket (LB-1294) regarding importing tracks, I think we can do them both.

      So far, I have created UI mockups and would like to hear some feedback (aerozol , mr_monkey ):

      Here how the playlist page will look like with the "Import..." button on the top-right side:

      The button works just like the "Add Listen" button, meaning it will have a dropdown menu. I made it in that way, because I was thinking we will add other music service options too:

      Once clicked, "Import from Spotify" option will check whether the user connected to Spotify or not, if positive, there would be the next page:

      User will be able to import multiple playlists, one by one.
      Here is the mockup for toast message, once the import was successful:

      Now, I'm not sure what to do further:
      Should I finish the front part first, pull the request then connect the backend? Regarding the dev part, once I get the playlist data with tracks, I'm not sure how to add it to LB (would much appreciate some help/guidance !! kartik1712

        1. expanded.png
          expanded.png
          5 kB
        2. import.png
          import.png
          50 kB
        3. main.png
          main.png
          44 kB
        4. toast.png
          toast.png
          6 kB

          [LB-1514] Import users' playlists from Spotify

          Monkey added a comment -

          I've opened LB-1700 to track the 100 limit issue

          Monkey added a comment - I've opened LB-1700 to track the 100 limit issue

          Monkey added a comment -

          Looked at the code in troi which imports spotify playlists, currently there is a hard limit set to 100
          https://github.com/metabrainz/troi-recommendation-playground/blob/5bb8bc168a9c93e0fb57068bc921c80c0ecfe87a/troi/tools/spotify_lookup.py#L180

          Monkey added a comment - Looked at the code in troi which imports spotify playlists, currently there is a hard limit set to 100 https://github.com/metabrainz/troi-recommendation-playground/blob/5bb8bc168a9c93e0fb57068bc921c80c0ecfe87a/troi/tools/spotify_lookup.py#L180

          sanojjonas added a comment -

          the importer currently only loads the first 100 tracks of the playlist. so it is not possible to load a full playlist (tried it with spotify & apple music)

          sanojjonas added a comment - the importer currently only loads the first 100 tracks of the playlist. so it is not possible to load a full playlist (tried it with spotify & apple music)

          Aerozol added a comment -

          Looks good! Agreed re. monkey with pointing users to the connect services page if they don't have Spotify connected.

          Aerozol added a comment - Looks good! Agreed re. monkey with pointing users to the connect services page if they don't have Spotify connected.

          Monkey added a comment -

          The mockups look pretty good so far kubrimskii!
          I think you have all you need to get started.

          Some minor feedback: I would make the button text "Import from…", and we will need a good way to point users that aren't connected to Spotify to the relevant page.

          I would recommend doing both the back-end and front-end in the same pull request, or starting with the back-end part (we don't want to merge and deploy front-end buttons that don't actually do anything )

          Monkey added a comment - The mockups look pretty good so far kubrimskii ! I think you have all you need to get started. Some minor feedback: I would make the button text "Import from…", and we will need a good way to point users that aren't connected to Spotify to the relevant page . I would recommend doing both the back-end and front-end in the same pull request, or starting with the back-end part (we don't want to merge and deploy front-end buttons that don't actually do anything )

            kubrimskii Rimma Kubanova
            kubrimskii Rimma Kubanova
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package