Hi,

According to the mpd protocol (1),  that is, if my understanding is
correct, I should be able, using an idle event, to get the state
('state: play, stop, or pause').
If I connect to mpd using telnet and enter status I get among other
lines the desired line.

I'm using mpd to locally stream an internet stream with as output 'httpd'.
The internet stream will sometime stop and I manually need to do 'mpc
play' to restart the internet stream which is not practicle.
To work around this, I now use a cronjob that executes 'mpc play' every
minute:

* * * * * user mpc play


I'd like to understand how idle events work and how I can get the
desired output.

In addition of understanding how idle events work, is there a better
approach to this?

Any input is welcome.


1)  https://www.musicpd.org/doc/html/protocol.html

--
John Doe

Reply via email to