pagination for long outputs: usage of small displays #2014
arkadirenko
started this conversation in
Ideas
Replies: 3 comments 2 replies
-
Why not do all the caching and pagination in the client and leave mpd 'lightweight'? |
Beta Was this translation helpful? Give feedback.
0 replies
-
because the "client" is a small microcontroller with limited ressources |
Beta Was this translation helpful? Give feedback.
0 replies
-
Many commands have a window parameter. I think it would be the best to extend the commands with this optional parameter. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I started an discussion in the mopidy-mpd github (mopidy/mopidy-mpd#66), because my plan is, to control an music player with an limited display.
For my purpose mopidy seems to be the right player for me, but unfortunately the JSON-RPC of mopidy is not microcontroller friendly speaking of ressources. So I figured out, that the leightweight mpd protocol is far better for my purpose and for my luck mopidy also supports the mpd protocol.
As I have the idea, to create extended versions of all protocoll command, which produce more output, that a small display could show, I finally thought, that this might be worth to be discussed here as well (and perhaps here is the right place at all).
So I have some questions to this group:
Are there plans (or have I overseen someting in my research), that one can implement own mpd commands for example with an special prefix like the X- prefixed http headers?
Are there plans to support paging for bigger outputs?
In short my idea looks like, having for all commands with expected bigger outputs an extend version. For example lsinfo could be extend with:
X-lsinfo /path/to/directory
would now report back only the number of results, while:
X-lsinfo /path/to/directory offset=10 count=5
would return 5 results of this directory, starting on offset 10.
My current idea is, that the first call (without offset and count) would cache the result from the underlying lsinfo, and upcomming calls with offset to the same path would be served from this cache. A call to another extend command or with an different path would invalidate the cache.
Beta Was this translation helpful? Give feedback.
All reactions