Question

I've started looking into using the python implementation of libspotify and I'd like to mess around with local files. I know how to identify the local files of a playlist, but I'd like to actually move them (like have a folder of the local files for a playlist or something). Is there a way to get the actual path name of a local file and then do something with it?

This answer implies to me that this may not be possible, which is fine. However I haven't been able to find any documentation specifically for or against this, and so far I haven't found anything in the source code.

Was it helpful?

Solution

Not using libspotify, no. Since you can log in to an account using libspotify on any computer, paths are meaningless - in fact, they never end up in the backend and the paths you can sort-of get from the desktop client are locally resolved ones.

For local tracks using libspotify, you need to ask the user where their local files are stored and dynamically resolve them yourself. The track URIs for these tracks contains basic metadata and a duration, which should be enough to find the track in question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top