From c087fcd3fa00b8e85c55d46aa6da4d3a30c9ca08 Mon Sep 17 00:00:00 2001 From: brningpyre <72670023+brningpyre@users.noreply.github.com> Date: Thu, 6 Apr 2023 12:08:55 -0600 Subject: [PATCH] Issue #70 Add Disabled attribute Should function the same as protected and others. --- build/lib/libpytunes/Library.py | 1 + build/lib/libpytunes/Song.py | 2 ++ libpytunes/Library.py | 1 + libpytunes/Song.py | 2 ++ 4 files changed, 6 insertions(+) diff --git a/build/lib/libpytunes/Library.py b/build/lib/libpytunes/Library.py index a405dba..1482005 100644 --- a/build/lib/libpytunes/Library.py +++ b/build/lib/libpytunes/Library.py @@ -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 diff --git a/build/lib/libpytunes/Song.py b/build/lib/libpytunes/Song.py index 285e77e..318a482 100644 --- a/build/lib/libpytunes/Song.py +++ b/build/lib/libpytunes/Song.py @@ -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 @@ -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__): diff --git a/libpytunes/Library.py b/libpytunes/Library.py index a405dba..1482005 100755 --- a/libpytunes/Library.py +++ b/libpytunes/Library.py @@ -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 diff --git a/libpytunes/Song.py b/libpytunes/Song.py index 285e77e..318a482 100755 --- a/libpytunes/Song.py +++ b/libpytunes/Song.py @@ -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 @@ -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__):