Hi, I need to catch some events such as when a song is played or paused. I also need to know who is at the origin of the event. It could be mpc, sonata, or the server itself (in the case of a queue).
I haven't seen an easy way to do this with the mpd protocol. Then, I saw in the mpd src. And it's not so easy: If you catch the command from the client, you aren't sure that the action is really performed. If you catch the event in the player thread, you don't know who is at the origin. So, I've made a crappy hack to catch these events and to write them in a file. But, I think it could be interesting to add this in MPD. To catch some events is the first step to implement a callback mechanism for client. A client asks at MPD to send it all events and the client can threats them. Currently, I think that Sonata checks every second (also crappy) the status of MPD to print some informations (title, time ...). With a callback mechanism, it just need to wait an event. Have you plan to do something like this ? Do you think it's acceptable to continu with "actives waiting" ? With regards, kg. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team