mikez / spotify-folders

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

Spotify 2020 parsing #2

Closed technomorph closed 4 years ago

technomorph commented 4 years ago

I’m getting issues now unless the folder has a sub folder it’s URI and name get messed up.

technomorph commented 4 years ago

Figured it out. I think because Spotify removed the "user" requirement for the Web API for playlists. Now in the cache it is being stored that way.

I found via Logging that Folder Row was still including after the name of the Folder "spotify:playlist:xxxxxxx" etc.

so I added a 'p' in the regex split :

rows = re.split(b'spotify:[usep]', data)

this now works as it should.

technomorph commented 4 years ago

Oh except now it's not adding the playlist Children properly.

i've adjusted to:

if row.startswith(b'laylist:'):

and now it adds the playlist children fine.

mikez commented 4 years ago

🙏 @technomorph for reporting. Does the new fix work for you?