I have some errors when using the find command, which is issued by ncmpcpp when using the media library.
find Artist "Madrugada" Album "Madrugada" Date "1974"
Returns multiple albums. The albums that shouldn't be returned:
I assume you're using the Spotify backend?
Ah, should have specified that. Yes, Spotify backend and MPD frontend.
In the Spotify backend, library.find_exact() is currently implemented by passing the job on to library.search(). I doesn't look like Spotify search supports exact matches. Thus, we probably need to filter the results to only include exact matches ourselves in library.find_exact().
spotify: Spotify wants 'track', not 'title' (#272)
mpd: Support search by date (#272)
With the two above changes, your example command returns exactly what you're looking for.
It still remains to make find_exact only return exact matches from Spotify.
@trygveaa Could you to summarize your suggestions from IRC on how to improve find_exact?
We can first do a search for the query provided. Then traverse either the artist or album results, depending on what the query contained, to find the one that matches exactly (this means that searches will have to be able to return artists and albums, as discussed in #285). At last we do a lookup of the artist or album to retrieve all the tracks.
The benefits of this vs. a normal search:
This reminds me of my recent idea to have a library API to allow MPD commands like list to be done more directly than searching if the backend implements it.
Would this somehow merged to #45?
Moved to mopidy/mopidy-spotify#11.