mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Added Deezer and TheAudioDB as metadata providers
This commit is contained in:
parent
898dd9735c
commit
a41aa0962b
@ -28,7 +28,7 @@ FORCE_PASSWORD = none
|
||||
|
||||
# order in which to use the metadata providers
|
||||
# keep in mind that musicbrainz is rate-limited and should probably not be used first
|
||||
METADATA_PROVIDERS = [lastfm,spotify,musicbrainz]
|
||||
METADATA_PROVIDERS = [lastfm,spotify,deezer,musicbrainz]
|
||||
# whether to proxy scrobble to other services
|
||||
SCROBBLE_LASTFM = false
|
||||
|
||||
|
4
maloja/thirdparty/__init__.py
vendored
4
maloja/thirdparty/__init__.py
vendored
@ -220,7 +220,9 @@ def b64(inp):
|
||||
__all__ = [
|
||||
"lastfm",
|
||||
"spotify",
|
||||
"musicbrainz"
|
||||
"musicbrainz",
|
||||
"audiodb",
|
||||
"deezer"
|
||||
]
|
||||
from . import *
|
||||
|
||||
|
21
maloja/thirdparty/audiodb.py
vendored
Normal file
21
maloja/thirdparty/audiodb.py
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
from . import MetadataInterface
|
||||
|
||||
class AudioDB(MetadataInterface):
|
||||
name = "TheAudioDB"
|
||||
identifier = "audiodb"
|
||||
|
||||
settings = {
|
||||
"api_key":"AUDIODB_API_KEY"
|
||||
}
|
||||
|
||||
metadata = {
|
||||
#"trackurl": "https://theaudiodb.com/api/v1/json/{api_key}/searchtrack.php?s={artist}&t={title}",
|
||||
"artisturl": "https://www.theaudiodb.com/api/v1/json/{api_key}/search.php?s={artist}",
|
||||
"response_type":"json",
|
||||
#"response_parse_tree_track": ["tracks",0,"astrArtistThumb"],
|
||||
"response_parse_tree_artist": ["artists",0,"strArtistThumb"],
|
||||
"required_settings": ["api_key"],
|
||||
}
|
||||
|
||||
def get_image_track(self,artist):
|
||||
return None
|
17
maloja/thirdparty/deezer.py
vendored
Normal file
17
maloja/thirdparty/deezer.py
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
from . import MetadataInterface
|
||||
|
||||
class Deezer(MetadataInterface):
|
||||
name = "Deezer"
|
||||
identifier = "deezer"
|
||||
|
||||
settings = {
|
||||
}
|
||||
|
||||
metadata = {
|
||||
"trackurl": "https://api.deezer.com/search?q={artist}%20{title}",
|
||||
"artisturl": "https://api.deezer.com/search?q={artist}",
|
||||
"response_type":"json",
|
||||
"response_parse_tree_track": ["data",0,"album","cover_medium"],
|
||||
"response_parse_tree_artist": ["data",0,"artist","picture_medium"],
|
||||
"required_settings": [],
|
||||
}
|
Loading…
Reference in New Issue
Block a user