mikez / spotify-folders

Get your Spotify folder hierarchy with playlists into JSON.
MIT License
58 stars 6 forks source link

Windows user note #13

Open arozehnal opened 1 month ago

arozehnal commented 1 month ago

The description should explicitly state that Spotify must not be running while the script is in use. Otherwise it will just say -> Directory structure created successfully! but no JSON is output.or the script crashes due to file access rights (presumably to the Spotify cache)

I thought I would get the playlist names in decoded form in addition to the folders. But this is what I got:

... { "name": "Metal", "type": "folder", "uri": "spotify:user:31hqqq6n2qc3vz6xgtcyhcxoi7za:folder:50af992cb8205895", "children": [ { "name": "Symphonic Metal", "type": "folder", "uri": "spotify:user:31hqqq6n2qc3vz6xgtcyhcxoi7za:folder:20a777a6be8117e3", "children": [ { "type": "playlist", "uri": "spotify:playlist:2OvMZOdXS8iQ2JToPWEMRs" }, { "type": "playlist", "uri": "spotify:playlist:04EMAbF1QQh60apzJChBOY" }, { "type": "playlist", "uri": "spotify:playlist:1hvIOO7usi6kGRe3oCPUh9" } ..,

Is that what was intended? Straight "text" playlist title would be better.

mikez commented 1 month ago

Thanks for posting the issue, @arozehnal!

Our Windows tester (@Nitemice) reported it worked on his end even when Spotify is running. Maybe something changed? As for the playlist title, the JSON you get back exactly what Spotify stores. You'll have to retrieve the title from the API.

Nitemice commented 1 month ago

@mikez I don't remember saying that it worked while Spotify is running. In fact, I always shut down Spotify before I run the script as a habit, because I know in the past it didn't work. I just tried it again, and it indeed still doesn't work. I got an error relating to file permissions. I think @arozehnal 's suggestion to mention in the README that Spotify needs to be shut down first is very reasonable.

mikez commented 1 month ago

@Nitemice Sorry. It was not my intention to misrepresent you. I must have misremembered. Thank you for chiming in and clarifying.

I'll add a disclaimer to the Readme.

mikez commented 1 month ago

I added the disclaimer "Also, you may want to close the Spotify app before running this to ensure data access and completeness." — Do you think this wording is helpeful @Nitemice @arozehnal?

(P.S.: I just tried it on macOS and experience no issues while the app is running.)

brodmo commented 1 month ago

I also encountered this in my testing, though only on Windows. I would imagine that it's fixable but a disclaimer also works

arozehnal commented 1 month ago

Well, I already know I need to turn Spotify off, but it took me a while to figure out what the problem is. I could have guessed it when the README says it reads the Spotify cache ;-) Disclaimer in README will be fine.

mikez commented 1 month ago

@brodmo If you have ideas of a simple fix, let me know. Windows seems to be doing something different than macOS; maybe holding a lock on the files?

brodmo commented 1 month ago

Yes, that's classic Windows. Are you writing or moving files? Reading shouldn't be an issue, but then Windows is weird like that sometimes.

mikez commented 1 month ago

@brodmo No writing or moving files, just reading.