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:
Arthur K. 2025-04-02 01:37:19 +03:00 committed by GitHub
parent d6b36886ba
commit bad4a355e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 103 additions and 19 deletions

View file

@ -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]: