mirror of
https://github.com/beetbox/beets.git
synced 2026-01-02 22:12:53 +01:00
Merge branch 'master' into dev
This commit is contained in:
commit
1cf2254e74
3 changed files with 9 additions and 7 deletions
|
|
@ -412,7 +412,7 @@ class SearchApiMetadataSourcePlugin(
|
|||
:return: Query string to be provided to the search API.
|
||||
"""
|
||||
|
||||
components = [query_string, *(f'{k}:"{v}"' for k, v in filters.items())]
|
||||
components = [query_string, *(f"{k}:'{v}'" for k, v in filters.items())]
|
||||
query = " ".join(filter(None, components))
|
||||
|
||||
if self.config["search_query_ascii"].get():
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ Bug fixes:
|
|||
artists but not labels. :bug:`5366`
|
||||
- :doc:`plugins/discogs` Fixed issue with ignoring featured artists in the
|
||||
extraartists field.
|
||||
- :doc:`plugins/spotify` Fixed an issue where candidate lookup would not find
|
||||
matches due to query escaping (single vs double quotes).
|
||||
|
||||
For packagers:
|
||||
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ class SpotifyPluginTest(PluginTestCase):
|
|||
params = _params(responses.calls[0].request.url)
|
||||
query = params["q"][0]
|
||||
assert "duifhjslkef" in query
|
||||
assert 'artist:"ujydfsuihse"' in query
|
||||
assert 'album:"lkajsdflakjsd"' in query
|
||||
assert "artist:'ujydfsuihse'" in query
|
||||
assert "album:'lkajsdflakjsd'" in query
|
||||
assert params["type"] == ["track"]
|
||||
|
||||
@responses.activate
|
||||
|
|
@ -117,8 +117,8 @@ class SpotifyPluginTest(PluginTestCase):
|
|||
params = _params(responses.calls[0].request.url)
|
||||
query = params["q"][0]
|
||||
assert "Happy" in query
|
||||
assert 'artist:"Pharrell Williams"' in query
|
||||
assert 'album:"Despicable Me 2"' in query
|
||||
assert "artist:'Pharrell Williams'" in query
|
||||
assert "album:'Despicable Me 2'" in query
|
||||
assert params["type"] == ["track"]
|
||||
|
||||
@responses.activate
|
||||
|
|
@ -233,8 +233,8 @@ class SpotifyPluginTest(PluginTestCase):
|
|||
params = _params(responses.calls[0].request.url)
|
||||
query = params["q"][0]
|
||||
assert item.title in query
|
||||
assert f'artist:"{item.albumartist}"' in query
|
||||
assert f'album:"{item.album}"' in query
|
||||
assert f"artist:'{item.albumartist}'" in query
|
||||
assert f"album:'{item.album}'" in query
|
||||
assert not query.isascii()
|
||||
|
||||
# Is not found in the library if ascii encoding is enabled
|
||||
|
|
|
|||
Loading…
Reference in a new issue