mopidy / mopidy-local

Mopidy extension for playing music from your local music archive
https://mopidy.com/ext/local/
Apache License 2.0
61 stars 26 forks source link

Limit of searchresults are hardcoded #48

Closed ScuttleSE closed 4 years ago

ScuttleSE commented 4 years ago

I don't know why, but for some reason the results of search against the local backend are hardcoded to return only 100 results. This has to be a bug or some kind of oversight.

The number of returned searchresult should be a number configurable in the config-file, or a parameter when doing the api.call.

kingosticks commented 4 years ago

Where are they hardcoded?

ScuttleSE commented 4 years ago

https://github.com/mopidy/mopidy-local/blob/master/mopidy_local/library.py

Line 81, there is no way to change that without editing the sourcecode

kingosticks commented 4 years ago

As to the why, I think that's clear from the current state of the Core API and our other discussion at https://discourse.mopidy.com/t/no-way-to-get-search-to-return-more-than-100-results/4098/2 and the issues linked in there to solve the problem.

I guess we could have it user-configurable for the time being (which we will rip out once the Core API is sorted out). Setting a default of 100 results and perhaps also having it unset meaning unlimited results doesn't seem unreasonable for this particular backend. We don't have a maintainer for this extension right now but if you want to submit a PR we can try and merge it.

ScuttleSE commented 4 years ago

49

kingosticks commented 4 years ago

Fixed in https://github.com/mopidy/mopidy-local/commit/5e6d26032c36220db646536a41066bf92c3d0b87