Add an option to prepend lyrics source header
This commit is contained in:
parent
d651894413
commit
4bfcbf17bd
5 changed files with 8 additions and 1 deletions
|
@ -51,6 +51,10 @@ class LyricsDl:
|
|||
|
||||
if lyrics:
|
||||
self.logger.info(f"[{provider.name}] Found lyrics!")
|
||||
|
||||
if self.config.prepend_header:
|
||||
lyrics = f"[re:lyrics-dl:{provider.name}]\n\n{lyrics}"
|
||||
|
||||
return lyrics
|
||||
|
||||
self.logger.info(f"[{provider.name}] No lyrics was found!")
|
||||
|
|
|
@ -23,6 +23,7 @@ CONFIG_PATH = _get_config_file()
|
|||
class LyricsDlConfig:
|
||||
order: list[str] = field(default_factory=lambda: ["kugou", "youtube"])
|
||||
delay: float | None = 10
|
||||
prepend_header: bool = True
|
||||
providers_configs: dict[str, dict] = field(default_factory=lambda: {})
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue