From 851f00aa9702a52ecf5d75927764cdf497c0e50e Mon Sep 17 00:00:00 2001 From: "Zander M." Date: Sat, 17 Aug 2024 01:23:59 -0400 Subject: [PATCH] Add support for other unsupported playlist types --- pomice/enums.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pomice/enums.py b/pomice/enums.py index ad69209..65d9c9e 100644 --- a/pomice/enums.py +++ b/pomice/enums.py @@ -86,6 +86,8 @@ class PlaylistType(Enum): PlaylistType.SPOTIFY defines that the playlist is from Spotify 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 @@ -93,6 +95,11 @@ class PlaylistType(Enum): SOUNDCLOUD = "soundcloud" SPOTIFY = "spotify" APPLE_MUSIC = "apple_music" + OTHER = "other" + + @classmethod + def _missing_(cls, value): + return cls.OTHER def __str__(self) -> str: return self.value