Add support for other unsupported playlist types

This commit is contained in:
Zander M. 2024-08-17 01:23:59 -04:00
parent 817295d321
commit 851f00aa97
No known key found for this signature in database
GPG Key ID: 8990C90B73B4B7A1
1 changed files with 7 additions and 0 deletions

View File

@ -86,6 +86,8 @@ class PlaylistType(Enum):
PlaylistType.SPOTIFY defines that the playlist is from Spotify PlaylistType.SPOTIFY defines that the playlist is from Spotify
PlaylistType.APPLE_MUSIC defines that the playlist is from Apple Music. PlaylistType.APPLE_MUSIC defines that the playlist is from Apple Music.
PlaylistType.OTHER defines that the playlist is from an unknown source (possible from 3rd-party plugins).
""" """
# We don't have to define anything special for these, since these just serve as flags # We don't have to define anything special for these, since these just serve as flags
@ -93,6 +95,11 @@ class PlaylistType(Enum):
SOUNDCLOUD = "soundcloud" SOUNDCLOUD = "soundcloud"
SPOTIFY = "spotify" SPOTIFY = "spotify"
APPLE_MUSIC = "apple_music" APPLE_MUSIC = "apple_music"
OTHER = "other"
@classmethod
def _missing_(cls, value):
return cls.OTHER
def __str__(self) -> str: def __str__(self) -> str:
return self.value return self.value