Created
October 25, 2014 05:50
-
-
Save Daniel15/ef7499c2525c618ebfda to your computer and use it in GitHub Desktop.
Add Google Play Music All Access playlists to the library. Uses https://github.com/simon-weber/Unofficial-Google-Music-API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gmusicapi import Mobileclient | |
api = Mobileclient() | |
api.login('daniel@example.com', 'hunter2') | |
playlist_contents = api.get_all_user_playlist_contents() | |
for playlist in playlist_contents: | |
playlist_tracks = playlist.get('tracks') | |
for pl_track in playlist_tracks: | |
track = pl_track.get('track') | |
api.add_aa_track(pl_track.get('trackId')) | |
print track.get('artist') + ' - ' + track.get('title') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment