draft: no metadata function for source
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -9,42 +9,32 @@ class SourceTypes(Enum):
|
||||
|
||||
|
||||
class SourcePages(Enum):
|
||||
YOUTUBE = "youtube"
|
||||
MUSIFY = "musify"
|
||||
YOUTUBE_MUSIC = "youtube music"
|
||||
GENIUS = "genius"
|
||||
MUSICBRAINZ = "musicbrainz"
|
||||
YOUTUBE = "youtube", "https://www.youtube.com/"
|
||||
MUSIFY = "musify", "https://musify.club/"
|
||||
YOUTUBE_MUSIC = "youtube music", "https://music.youtube.com/"
|
||||
GENIUS = "genius", "https://genius.com/"
|
||||
MUSICBRAINZ = "musicbrainz", "https://musicbrainz.org/"
|
||||
ENCYCLOPAEDIA_METALLUM = "encyclopaedia metallum"
|
||||
BANDCAMP = "bandcamp"
|
||||
DEEZER = "deezer"
|
||||
SPOTIFY = "spotify"
|
||||
BANDCAMP = "bandcamp", "https://bandcamp.com/"
|
||||
DEEZER = "deezer", "https://www.deezer.com/"
|
||||
SPOTIFY = "spotify", "https://open.spotify.com/"
|
||||
|
||||
# This has nothing to do with audio, but bands can be here
|
||||
WIKIPEDIA = "wikipedia"
|
||||
INSTAGRAM = "instagram"
|
||||
FACEBOOK = "facebook"
|
||||
TWITTER = "twitter" # I will use nitter though lol
|
||||
MYSPACE = "myspace" # Yes somehow this ancient site is linked EVERYWHERE
|
||||
WIKIPEDIA = "wikipedia", "https://en.wikipedia.org/wiki/Main_Page"
|
||||
INSTAGRAM = "instagram", "https://www.instagram.com/"
|
||||
FACEBOOK = "facebook", "https://www.facebook.com/"
|
||||
TWITTER = "twitter", "https://twitter.com/"
|
||||
MYSPACE = "myspace", "https://myspace.com/" # Yes somehow this ancient site is linked EVERYWHERE
|
||||
|
||||
MANUAL = "manual"
|
||||
MANUAL = "manual", ""
|
||||
|
||||
PRESET = "preset"
|
||||
PRESET = "preset", ""
|
||||
|
||||
@classmethod
|
||||
def get_homepage(cls, attribute) -> str:
|
||||
homepage_map = {
|
||||
cls.YOUTUBE: "https://www.youtube.com/",
|
||||
cls.MUSIFY: "https://musify.club/",
|
||||
cls.MUSICBRAINZ: "https://musicbrainz.org/",
|
||||
cls.ENCYCLOPAEDIA_METALLUM: "https://www.metal-archives.com/",
|
||||
cls.GENIUS: "https://genius.com/",
|
||||
cls.BANDCAMP: "https://bandcamp.com/",
|
||||
cls.DEEZER: "https://www.deezer.com/",
|
||||
cls.INSTAGRAM: "https://www.instagram.com/",
|
||||
cls.FACEBOOK: "https://www.facebook.com/",
|
||||
cls.SPOTIFY: "https://open.spotify.com/",
|
||||
cls.TWITTER: "https://twitter.com/",
|
||||
cls.MYSPACE: "https://myspace.com/",
|
||||
cls.WIKIPEDIA: "https://en.wikipedia.org/wiki/Main_Page"
|
||||
}
|
||||
return homepage_map[attribute]
|
||||
def __new__(cls, value, homepage = None):
|
||||
member = object.__new__(cls)
|
||||
|
||||
member._value_ = value
|
||||
member.homepage = homepage
|
||||
|
||||
return member
|
||||
|
||||
Reference in New Issue
Block a user