Spotty-Plugin icon indicating copy to clipboard operation
Spotty-Plugin copied to clipboard

Search results are limited to max 50 results

Open Gagi2k opened this issue 3 years ago • 4 comments

When using the search for searching some generic terms e.g. "rock", the track list is limited to 56 items (50 tracks + 6 folders for categories). All categories (e.g. artists) are also limited to 50 results.

Can this limitation be lifted ? It also looks like the count: property for such searches (using the CLI/jsonRPC API) always returns the requested length (if it is smaller than the limit of 50 results) instead of the count which available in total.

request the first 5 results -> count == 5 request the first 50 results -> count == 50 request the first 100 results -> count == 50

Gagi2k avatar Oct 27 '20 20:10 Gagi2k

When using the search for searching some generic terms e.g. "rock", the track list is limited to 56 items (50 tracks + 6 folders for categories). All categories (e.g. artists) are also limited to 50 results.

Can this limitation be lifted ?

It certainly could be done. But in my experience it doesn't make sense, because if you get more than 50 items you better do a more specific search. Do you ever browse past page 2 in a Google search? I don't.

I'm also hesitating because paging search results could be relatively complicated for what it brings as API calls to Spotify don't allow to get more than 50 results in one go. No rocket science, but not worth the trouble IMHO. And in all these years I can't remember anybody asking for more before!

It also looks like the count: property for such searches (using the CLI/jsonRPC API) always returns the requested length (if it is smaller than the limit of 50 results) instead of the count which available in total.

That would be a bug. I vaguely remember somebody reporting a similar issue in the forums recently. Might be related. Are you using raw requests, without the "menu:1" parameter?

michaelherger avatar Oct 28 '20 04:10 michaelherger

Yes, sometimes i'm also using the second page on Google, but only if all my previous 10 search attempts didn't show any better results already... It's not a big deal. I can life with it, it's just a different behavior compared to other searches e.g. for radio stations or in your local database.

I'm not passing the "menu:1" parameter. Is this documented somehwere ? I was not aware of such an option and also the possible implications of it.

Gagi2k avatar Oct 28 '20 15:10 Gagi2k

menu:1 would instead of returning raw data, return menu information. Last time I looked into this I was under the impression that the count would differ, depending whether you requested menu data or raw. To be confirmed.

michaelherger avatar Oct 28 '20 16:10 michaelherger

I just tried it with menu:1, but it's still the same when doing a request from 0 to 50 the count is 50, from 0 to 100 the count is 56 (using item_id 0.0)

Gagi2k avatar Oct 28 '20 18:10 Gagi2k