Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not ignore the exact parameter in the search method #318

Merged
merged 5 commits into from
Jan 13, 2022

Conversation

telnet23
Copy link
Contributor

Because the sp_search_query function has always added double quotes around the query and double quotes instruct the Spotify API to perform exact matching, the search function has always performed exact matching, regardless of whether exact is False or True.

elif field == "any":
result.append(f'"{value}"')
else:
result.append(f'{field}:"{value}"')

Since exact matching has been the only behavior (and therefore the default behavior) since the inception of Mopidy-Spotify, it could be sensible to keep exact matching as the default behavior. However, according to the Mopidy documentation, inexact matching is supposed to be the default behavior.

@kingosticks kingosticks self-assigned this Jan 12, 2022
@kingosticks kingosticks added C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal A-webapi Area: Spotify Web API labels Jan 12, 2022
@kingosticks kingosticks merged commit 797a486 into mopidy:master Jan 13, 2022
@kingosticks kingosticks added this to the Next feature release milestone Jan 13, 2022
kingosticks added a commit to kingosticks/mopidy-spotify that referenced this pull request Dec 20, 2023
* Do not ignore the `exact` parameter in the `search` method

* Reformat to comply with Flake8 and Black

* Correct additional tests

* flake8 fix

Co-authored-by: Nick Steel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-webapi Area: Spotify Web API C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants