mirror of
https://github.com/beetbox/beets.git
synced 2025-12-26 02:24:33 +01:00
Adjusted typehint for search api. Removed optional none from filter.
This commit is contained in:
parent
1f15598294
commit
04a3dd2169
2 changed files with 11 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue