spotify / web-api

This issue tracker is no longer used. Join us in the Spotify for Developers forum for support with the Spotify Web API ➡️ https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
981 stars 79 forks source link

Retrieve Playlists' Folders #38

Closed mklschreiber closed 6 years ago

mklschreiber commented 9 years ago

Currently there is no information published about the folder in which the playlist is located. So the third party can just show all playlists in a flat list. It would be a great improvement if we could show the same structure like the official spotify application does.

For example:

Playlist Folder A ....Playlist Folder A-a ........Playlist Test ....Playlist Folder A-b ........Playlist Test2 Playlist Folder B ....Playlist Test3

tomverhoeff commented 6 years ago

As a heavy Spotify user, I spend literally hours to organize playlists into the right folders to keep a bit of organization in my library. I understand this is only relevant for a small subset of users and therefore doesn't get a lot of attention in the native applications. However, exposing basic folder management APIs should be doable right?

As soon as this is possible I'd be happy to build a simple web-app that just enables quick reordering of playlists (in bulk). Is that too much to ask?

fbegue commented 6 years ago

I would seem also that the web player - in no form that I can see - recognizes playlist folders either, which seems like a major issue for users who use the folder function regularly.

As a developer who is new to the Spotify web API, this is really the first time I've been disappointed by all the awesome work you guys have put into letting us play around with this beautiful platform! PLEASE at least give us a hint if this is something that will be coming in the future, or SOME kind of workaround?! Really any way to extract the folder'd state of my playlists on the mobile or desktop application - not even a live report - would be acceptable, since as of Janurary it would seem this is not happening.

Much love

klihelp commented 6 years ago

Workaround I was thinking is to combine Spotify API with an external playlist organizer API, eg Google Sheets, where playlist IDs listed into folder categories.

willdunning commented 6 years ago

Wow. Three years the only official word from Spotify is "...don't add +1 comments to this thread..." It would be great to hear anything from a Spotify dev / advocate about the issue. A definitive "won't do" would be preferable to the the ocean of silence.

0xNF commented 6 years ago

Any updates to the potential for adding folder apis? For an service that bills itself as playlist focused, there's a lot of playlist-peripheral features that are missing.

cacothi commented 6 years ago

It’s a shame that they open this channel to the community, and once they got big they forget about them On Sun, 10 Jun 2018 at 10:49 am, 0xNF notifications@github.com wrote:

Any updates to the potential for adding folder apis? For an service that bills itself as playlist focused, there's a lot of playlist-peripheral features that are missing.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spotify/web-api/issues/38#issuecomment-396010069, or mute the thread https://github.com/notifications/unsubscribe-auth/ALgDTyqWoeo002OCxKMWAPBsL99bR5Dnks5t7G00gaJpZM4ELUvR .

arirawr commented 6 years ago

Hi again all,

We have looked into this feature request. The implementation of folders you see in the Desktop client is not one that lends itself to a resource-based API (for example, there are no folder IDs). Unfortunately this is something we are not technically able to implement. As a result, we are not able to support playlist folders in the Web API.

Thank you for your patience. We will try to be more clear about things like this in the future.

klihelp commented 6 years ago

Alternative idea can be to add a new folder attribute/value for each playlist, but adding to the folder ID reason, somehow Spotify apps able to list folders with it's very own sub-folders and playlists, then without folder IDs, maybe Spotify uses a NO_SQL, NO-DB setup..

Ideas for API users/programmers to test, anyone have other ideas?

fbegue commented 6 years ago

@klihelp Following the idea of doing the folder management outside of the Spotify API - what was your thinking here? And what is your use case? For me, I want my Node.js applications that use the Spotify API to be able to 'see' the current state of folders in the desktop/mobile application. Do you know of any application outside of the official ones that can see playlist folders? I don't even know where to start looking

Edit: Or even a way to capture the folder-playlist structure from the running official/mobile apps that can than be used 'on faith' by a web app? idk man just spitballing

0xNF commented 6 years ago

If the main issue is that folders don't have IDs, then you could just interpret any / inside a playlist name as belonging to a folder. Bit ghetto, though.

I'm kind of curious how Spotify is doing it, if they don't a concrete folder object.

tomledger commented 6 years ago

@arirawr could you just add a 'folders' attribute to the playlist object containing a string showing the full path (e.g. 'genres/reggae'), and let the end user use that to construct a folder list if necessary?

mikez commented 6 years ago

If you want a short-term workaround, this seems to work on my machine:

https://github.com/mikez/spotify-folders

fbegue commented 6 years ago

@mikez Hey thats not to bad. Have you tried doing this on a Windows machine? At a quick glance, if I were to appropriate this for myself, I would need to do what? adjust file paths and change get_all_persistent_cache_files to do something Windows-ish? Thanks

mikez commented 6 years ago

@fbegue Feel free to message me on twitter: twitter.com/mikez

villeodell commented 6 years ago

Adding additional context to consider for issue:

I just discovered this issue/thread as a Spotify user who was forced into using playlists when, to my surprise, I was informed by Spotify that I couldn't add any more music to my library (wtf? -- of course there are reasons, but from a user experience perspective it's like saying -- Whoah there, you've liked too much music, Spotify is no longer for you).

Such is life and I started using playlists to save albums; pleased to find that I could group them under folders for easier access / listening (e.g. doing: 'genre-folder/sub-genre-folder/album-playlist' or 'label-folder/album-playlist' is really great!). Not so easy to manage though once you have more than a few -- and discovering that there is zero support for playlist folders via the web api is a bummer.

Users can have folders so it would be great if developers could support those for users everywhere users can access Spotify (e.g. Google Home Actions, Sonos, playlist managers, etc.. ) -- users expect this by default (e.g. search for spotify folders on the Sonos community forums).

Couldn't issue be kept open but labeled 'blocked' (e.g. by "no folder IDs" which could be tracked internally?)

xuezhma commented 6 years ago

Unfortunately this is something we are not technically able to implement

There are so many ways to implement this. Looking into workaround provided by mikez, there seems to be IDs for folders already. https://github.com/mikez/spotify-folders

{
  "name": "Seasons",
  "type": "folder",
  "uri": "spotify:user:example:folder:f0dcb1c2b1a98521",
  "children": [{
    "name": "Summer",
    "type": "folder",
    "uri": "spotify:user:example:folder:8212237ac7347bfe",
    "children": [{
        "type": "playlist",
        "uri": "spotify:user:spotify:playlist:37i9dQZF1DXdCsscAsbRNz"
     }, {
        "type": "playlist",
        "uri": "spotify:user:spotify:playlist:37i9dQZF1DWZd79rJ6a7lp"
     }]
  }, {
    "name": "Winter",
    "type": "folder",
    "uri": "spotify:user:example:folder:4b254ce1b7f5e23d"
    "children": [{
      "type": "playlist",
      "uri": "spotify:user:spotify:playlist:37i9dQZF1DWSiZVO2J6WeI"
    }]
  }
}

"uri": "spotify:user:example:folder:f0dcb1c2b1a98521",

f0dcb1c2b1a98521 looks like an folder id to me.

Spotify prob simply wants to focus on stuff like promoting ads passively and grab cash than actually making the product better.

kayvanbree commented 5 years ago

Damn. You guys don't want to remove the 10k song limit, you don't want us to use folders to let us organize albums into folders. We can't do anything here if you are part of the 1%...

If you implement a folder API where we can organize playlists into folders, I can continue on my Spotify playlist organizer app and I won't complain about the 10k song limit anymore. Spotify is an awesome music player, but the way you treat your paying customers is ridiculous. One percent of the current user base amounts to 22 million annoyed customers.

gralpli commented 5 years ago

That wontfix tag there is hilarious. This is such a basic thing and of course it's technically possible to implement this. They probably just want to make it harder to write tools that help switching from Spotify to an alternative provider.

@arirawr

arirawr commented 5 years ago

@gralpli , I'm no longer at Spotify and can't help you with this issue. Please refrain from tagging me.

technomorph commented 4 years ago

For my app, I use mikez parser:

https://github.com/mikez/spotify-folders

Create a JSON out of the output. In Objective-C I create a new Root Folder dictionary. I walk thru the JSON.

If the item is a folder I add relevant info such as the name, ID and URI. If the folder has children I then reload thru my folder parsing function.

If the item is a playlist. I add the ID and URI (Mikes Parsing doesn’t include the name)

After recreating my own version of the folder parsing. I use the Web API to get all current users playlists.

I think walk thru my Folder/playlists dictionary. For any playlists I get the playlist ID. Filter / Find it in all user playlists. Get the name, and the Tracks Link Ref URL. I the. Update my Folder/playlists dictionary.

In my user interface I have two table views. One on the left To display the Folders / playlists names and their items (children) count.
One on the right that shows the tracks of a playlist is selected on the left.

Once a playlist is selected on the left. I use the playlist tracks ref URL and the web API to quickly fetch the tracks, I parse Them and then add them to the items of the playlist in my Folder/playlist dictionary .

Then update the table views.

It works great but don’t have the functionally or being able to: 1) create / delete folders 2) move playlists within folders