feat: add lrclib and genius providers (#5)
* feat: lrclib and genius providers * revert `prepend_header` to true * change providers order --------- Co-authored-by: mrsobakin <68982655+mrsobakin@users.noreply.github.com>
This commit is contained in:
parent
d6b36886ba
commit
bad4a355e8
8 changed files with 103 additions and 19 deletions
|
@ -4,14 +4,14 @@ from lrc_dl.core import AbstractProvider
|
|||
class Registry:
|
||||
providers: dict[str, type[AbstractProvider]] = {}
|
||||
|
||||
@staticmethod
|
||||
def get_synced_providers() -> dict[str, type[AbstractProvider]]:
|
||||
@classmethod
|
||||
def get_synced_providers(cls) -> dict[str, type[AbstractProvider]]:
|
||||
# TODO: stub
|
||||
return dict(Registry.providers)
|
||||
return dict(cls.providers)
|
||||
|
||||
@staticmethod
|
||||
def register_provider(provider_class: type[AbstractProvider]) -> None:
|
||||
Registry.providers[provider_class.name] = provider_class
|
||||
@classmethod
|
||||
def register_provider(cls, provider_class: type[AbstractProvider]) -> None:
|
||||
cls.providers[provider_class.name] = provider_class
|
||||
|
||||
|
||||
def lyrics_provider(cls: type[AbstractProvider]) -> type[AbstractProvider]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue