Skip to content

Commit

Permalink
Merge pull request #59 from pieterderycke/master
Browse files Browse the repository at this point in the history
added support for detecting genius and smart playlists
  • Loading branch information
NathanDotTo authored Feb 9, 2019
2 parents 26b48c5 + ad86b2a commit 6a21e9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libpytunes/Library.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def getPlaylist(self, playlistName):
p.playlist_persistent_id = playlist.get('Playlist Persistent ID')
p.parent_persistent_id = playlist.get('Parent Persistent ID')
p.distinguished_kind = playlist.get('Distinguished Kind')
p.is_genius_playlist = True if playlist.get('Genius Track ID') else False
p.is_smart_playlist = True if playlist.get('Smart Info') and not playlist.get('Folder', False) else False
tracknum = 1
# Make sure playlist was not empty
if 'Playlist Items' in playlist:
Expand Down

0 comments on commit 6a21e9c

Please sign in to comment.