Skip to content
This repository was archived by the owner on Apr 16, 2019. It is now read-only.

Conversation

@rjbell4
Copy link
Contributor

@rjbell4 rjbell4 commented May 20, 2014

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
Copy link
Owner

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
Copy link
Contributor Author

rjbell4 commented May 20, 2014

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.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to help track down the 'Input/output error' issue which I'm seeing as well.

I have found that one of my playlist entries has an empty name. When I add a check after line 220 to disregard the playlist entry then things are working correctly for me:

        if name == '':
            continue

Some more info: the offending playlist name is a blank string, and the contents are an empty list. I'm not sure why the google music api is including it but I think it's safe to discard it for our usage. I'm using the gmusicapi (4.0.1-dev) version.

Hopefully this helps move things along with this pull request. It's really nice to have the playlists/ folder.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants