Closed tkem closed 9 years ago
Thanks for this, @tkem. I'm playing around with changing this on mopidy's side; it's really strange there's no way to drive the limit parameter straight down to the library.
I guess this was just overlooked in Mopidy core, since the json
library doesn't handle the limit
parameter; see also https://github.com/mopidy/mopidy/issues/917
Yeah, it's strange that the json library "works" (meets expected behavior for ncmpcpp users) because it ignores the spec. I've fixed this locally, but still need to tidy up my changes before submitting a pull request.
I'd love to see that (json handling "limit" and "offset", and mpd "list" commands still working as expected), so good luck with your PR!
Since Mopidy v0.19 does not pass a
limit
toLibrary.search()
, all searches will return max. 100 results, as defined in themopidy.local.Library
spec. As a temporary workaround, a new config parameter can be introduced that, if set, overrides the limit parameter. In the default config, this should be set to -1 for now (no limit) to mirror the behavior if thejson
library.