From 817295d3214f4bd320694a74c0a4a4a1e08855a4 Mon Sep 17 00:00:00 2001 From: "Zander M." Date: Sat, 17 Aug 2024 00:46:32 -0400 Subject: [PATCH] Add support for other unsupported source types --- pomice/enums.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pomice/enums.py b/pomice/enums.py index 1e963de..ad69209 100644 --- a/pomice/enums.py +++ b/pomice/enums.py @@ -54,6 +54,8 @@ class TrackType(Enum): TrackType.HTTP defines that the track is from an HTTP source. TrackType.LOCAL defines that the track is from a local source. + + TrackType.OTHER defines that the track 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 @@ -63,6 +65,11 @@ class TrackType(Enum): APPLE_MUSIC = "apple_music" HTTP = "http" LOCAL = "local" + OTHER = 'other' + + @classmethod + def _missing_(cls, value): + return cls.OTHER def __str__(self) -> str: return self.value