✨ Can search for artists using an artist link.
This commit is contained in:
@@ -20,6 +20,7 @@ class MediaType(StrEnum):
|
||||
PLAYLIST: str = "playlist"
|
||||
ALBUM: str = "album"
|
||||
MIX: str = "mix"
|
||||
ARTIST: str = "artist"
|
||||
|
||||
|
||||
class SkipExisting(StrEnum):
|
||||
|
||||
@@ -58,6 +58,8 @@ def get_tidal_media_type(url_media: str) -> MediaType | bool:
|
||||
result = MediaType.PLAYLIST
|
||||
elif media_name == "mix":
|
||||
result = MediaType.MIX
|
||||
elif media_name == "artist":
|
||||
result = MediaType.ARTIST
|
||||
|
||||
return result
|
||||
|
||||
@@ -148,6 +150,8 @@ def instantiate_media(
|
||||
media = session.playlist(id_media)
|
||||
elif media_type == MediaType.MIX:
|
||||
media = session.mix(id_media)
|
||||
elif media_type == MediaType.ARTIST:
|
||||
media = session.artist(id_media)
|
||||
else:
|
||||
raise MediaUnknown
|
||||
|
||||
|
||||
Reference in New Issue
Block a user