Adjusted typehint for search api. Removed optional none from filter.

This commit is contained in:
Sebastian Mohr 2025-06-18 14:19:27 +02:00
parent 1f15598294
commit 04a3dd2169
2 changed files with 11 additions and 4 deletions

View file

@ -739,7 +739,7 @@ class MetadataSourcePlugin(Generic[R], BeetsPlugin, metaclass=abc.ABCMeta):
def _search_api(
self,
query_type: Literal["album", "track"],
filters: dict[str, str] | None,
filters: dict[str, str],
keywords: str = "",
) -> Sequence[R]:
raise NotImplementedError

View file

@ -232,7 +232,16 @@ class DeezerPlugin(MetadataSourcePlugin[Response], BeetsPlugin):
def _search_api(
self,
query_type: Literal["album", "track"],
query_type: Literal[
"album",
"track",
"artist",
"history",
"playlist",
"podcast",
"radio",
"user",
],
filters: dict[str, str],
keywords="",
) -> Sequence[Response]:
@ -240,8 +249,6 @@ class DeezerPlugin(MetadataSourcePlugin[Response], BeetsPlugin):
the provided ``filters``.
:param query_type: The Deezer Search API method to use.
Valid types are: 'album', 'artist', 'history', 'playlist',
'podcast', 'radio', 'track', 'user', and 'track'.
:param keywords: (Optional) Query keywords to use.
:return: JSON data for the class:`Response <Response>` object or None
if no search results are returned.