Skip to content

Commit

Permalink
Issue #70 Add Disabled attribute
Browse files Browse the repository at this point in the history
Should function the same as protected and others.
  • Loading branch information
brningpyre committed Apr 6, 2023
1 parent 36d16c5 commit c087fcd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/lib/libpytunes/Library.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def getSongs(self):
s.playlist_only = 'Playlist Only' in attributes
s.apple_music = 'Apple Music' in attributes
s.protected = 'Protected' in attributes
s.disabled = 'Disabled' in attributes

self.songs[int(trackid)] = s

Expand Down
2 changes: 2 additions & 0 deletions build/lib/libpytunes/Song.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Song:
playlist_only = None (Bool)
apple_music = None (Bool)
protected = None (Bool)
disabled = False (Boolean)
"""
name = None
track_id = None
Expand Down Expand Up @@ -87,6 +88,7 @@ class Song:
playlist_only = None
apple_music = None
protected = None
disabled = False

def __iter__(self):
for attr, value in iteritems(self.__dict__):
Expand Down
1 change: 1 addition & 0 deletions libpytunes/Library.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def getSongs(self):
s.playlist_only = 'Playlist Only' in attributes
s.apple_music = 'Apple Music' in attributes
s.protected = 'Protected' in attributes
s.disabled = 'Disabled' in attributes

self.songs[int(trackid)] = s

Expand Down
2 changes: 2 additions & 0 deletions libpytunes/Song.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Song:
playlist_only = None (Bool)
apple_music = None (Bool)
protected = None (Bool)
disabled = False (Boolean)
"""
name = None
track_id = None
Expand Down Expand Up @@ -87,6 +88,7 @@ class Song:
playlist_only = None
apple_music = None
protected = None
disabled = False

def __iter__(self):
for attr, value in iteritems(self.__dict__):
Expand Down

0 comments on commit c087fcd

Please sign in to comment.