Accept lyrics source as a string (#6149)

## Description

Fixes #5962.

The fix was shared in the issue. Now it uses ```as_str_seq``` similarly
to other plugins.
This commit is contained in:
Sebastian Mohr 2025-11-07 10:40:35 +01:00 committed by GitHub
commit 7cca07d2c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -958,7 +958,7 @@ class LyricsPlugin(RequestHandler, plugins.BeetsPlugin):
@cached_property
def backends(self) -> list[Backend]:
user_sources = self.config["sources"].get()
user_sources = self.config["sources"].as_str_seq()
chosen = sanitize_choices(user_sources, self.BACKEND_BY_NAME)
if "google" in chosen and not self.config["google_API_key"].get():

View file

@ -29,6 +29,8 @@ Bug fixes:
audio-features endpoint, the plugin logs a warning once and skips audio
features for all remaining tracks in the session, avoiding unnecessary API
calls and rate limit exhaustion.
- :doc:`plugins/lyrics`: Accepts strings for lyrics sources (previously only
accepted a list of strings). :bug:`5962`
For plugin developers: