fow5040 / Flow.Launcher.Plugin.SpotifyPremium

Spotify Premium plug-in for Flow Launcher
MIT License
31 stars 2 forks source link

[FEATURE REQUEST] Personalized search #21

Open nikolicpetar17 opened 1 year ago

nikolicpetar17 commented 1 year ago

When I search for song on spotify it almost always shows up first but when I search for the same song on plugin it shows way below. Is there a way to fix that?

nikolicpetar17 commented 1 year ago

For example on spotify i only need to type first two letters of the name of song and it shows up first, but in flow launcher when i type in the whole name of the song in only shows in 7th place of results

nikolicpetar17 commented 1 year ago

Sorry, I just realised that it learns form your previous searches, still it whould be good if it could now your spotify preferences. Thanks for effort put into this plugin btw

fow5040 commented 1 year ago

I'll take another look at how the search API is structured but I suspect that it doesn't provide the same recommendation order as the client does.

nikolicpetar17 commented 1 year ago

I've noticed that when I type "Track" before searching it shows me personalized results, but when I just type the name of the song it often won't show up

fow5040 commented 1 year ago

Yeah the Spotify search API still doesn't really provide any insight into how ranking works. We respect the order that is provided for both the ALL search (sp query) and the track search (sp track query). Maybe the limit that is set (3) in ALL search affects how results are ranked, I could try bumping this up to 10 or so and seeing if results returned line up more with the regular track API.

fow5040 commented 1 year ago

Ok yeah I think this is the culprit. Calling Search(TYPE.Track, limit=10) and Search(TYPE.Track, limit=3) has unexpected behavior

You might assume Search(limit=3) is just a truncated list made from the results of Search(limit=10), but in reality Spotify is intentially choosing a different order for your results if your limit is lower.