Add support for other unsupported source types

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

View File

@ -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