EnigmaCurry / GMusicFS

A FUSE filesystem for Google Music
153 stars 36 forks source link

Add support for playlists #29

Open rjbell4 opened 10 years ago

rjbell4 commented 10 years ago

This change adds a playlists directory parallel to the artists directory. Within each directory is the name of a playlist, and within that are the songs in the playlist. The songs are numbers (like tracks would be) based on the playlist ordering. Because they could be from anywhere, the filenames have the artist, album AND title information.

Things get a bit confusing processing the playlist entries, as Google Music returns them two different ways, based on whether it's a song in get_all_songs() or not. I worked with the Simon Weber in #gmusicapi to make sure I had the right approach here.

I'm no Python expert -- in fact, this is the most I've ever done in Python -- but I've done plenty of programming in other languages. So I think the concepts here are sound, and tend to match how the rest of GMusicFS works, but if I failed to do any thing the "proper Python way", please let me know, and I'll correct it.

EnigmaCurry commented 10 years ago

Code looks good, but it's not working for me.

When I list the playlists directory I just get:

ls: reading directory .: Input/output error

I'll see if I can find some time to debug why that might be the case for my account. as I assume it's not happening for you. Are you using gmusicapi master or develop (neither works for me)?

rjbell4 commented 10 years ago

Yeah, it obviously is working for me. I'm using the develop branch of gmusicapi.

I added some extra output if run with the -vv option that might indicate what's happening.