Add support for other unsupported source types
This commit is contained in:
parent
8ab3ae9ccd
commit
817295d321
|
|
@ -54,6 +54,8 @@ class TrackType(Enum):
|
||||||
TrackType.HTTP defines that the track is from an HTTP source.
|
TrackType.HTTP defines that the track is from an HTTP source.
|
||||||
|
|
||||||
TrackType.LOCAL defines that the track is from a local 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
|
# 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"
|
APPLE_MUSIC = "apple_music"
|
||||||
HTTP = "http"
|
HTTP = "http"
|
||||||
LOCAL = "local"
|
LOCAL = "local"
|
||||||
|
OTHER = 'other'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _missing_(cls, value):
|
||||||
|
return cls.OTHER
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return self.value
|
return self.value
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue