Hi,

I'm trying to figure out the correct way to use the IDLE command in an 
application using libmpdclient. Max, you wrote in
https://github.com/MusicPlayerDaemon/MPD/issues/42#issuecomment-316913920:

> No, no, no, [using one IDLE connection and one command connection is] the 
> wrong way to use idle! Your one single connection should always be in idle 
> mode. Now the user presses "pause" or something, then your client sends 
> noidle, followed by pause, and then re-enters idle.

That is a perfectly reasonable approach for scenarios where only one client is 
ever connected to the server.

I understand from the documentation and the subsequent discussion on Github 
that changes triggered by other clients will
not be lost. However, I'm concerned about reflecting changes made by other 
clients in my client's UI with as little
latency as possible. I assume it's unreasonable to spam the server with 
IDLE/NOIDLE commands many times a second. But I
cannot use mpd_run_idle to wait for changes, either, unless there is a way to 
interrupt the wait if a user interacts
with my UI.

What is considered the most MPD-like way of handling such a scenario?

Cheers,

Daniel
_______________________________________________
mpd-devel mailing list
mpd-devel@musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel

Reply via email to