This repository was archived by the owner on Apr 16, 2019. It is now read-only.
Add support for playlists #29
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.