spotify-folders icon indicating copy to clipboard operation
spotify-folders copied to clipboard

Windows user note

Open arozehnal opened this issue 1 year ago • 9 comments

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.

arozehnal avatar Jul 14 '24 20:07 arozehnal

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.

mikez avatar Jul 14 '24 21:07 mikez

@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.

Nitemice avatar Jul 16 '24 14:07 Nitemice

@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 avatar Jul 16 '24 14:07 mikez

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.)

mikez avatar Jul 16 '24 14:07 mikez

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

brodmo avatar Jul 16 '24 15:07 brodmo

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.

arozehnal avatar Jul 16 '24 16:07 arozehnal

@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?

mikez avatar Jul 16 '24 17:07 mikez

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.

brodmo avatar Jul 16 '24 18:07 brodmo

@brodmo No writing or moving files, just reading.

mikez avatar Jul 16 '24 18:07 mikez