Hi all,
I'm developing a GUI in C# to control a SqueezeboxServer. I say server because I learned that you control the server and that the server controls the players.
I'm able to send messages to the server, for example start a song or an album. I'm also able to get the status of the server by sending "serverstatus 0 999".
But what I don't get is how I can get a notification when a song/album has ended. So I wonder how I can get this notification. Does the server send events when a player has stopped playing?
How does the Duet Controller this? Is he constantly polling for status?
Hope somebody has the answer (preferably in C#)
Thx!
Results 1 to 3 of 3
-
2010-06-02, 06:41 #1
- Join Date
- Apr 2010
- Posts
- 8
How does eventing works with SqueezeboxServer?
-
2010-06-02, 09:54 #2
Just to confirm, subscribing on events should be possible independent if you use the CLI interface or the JSON/cometd interface.
In the CLI interface there is a "listen" command that sets up a subscription.
In the JSON/cometd you setup a subscription. I'm not sure exactly how to do this and I definitely doesn't know how to do it from C#, but the lua code that does it on the controller can be found in the "subscribe" function in this file:
http://svn.slimdevices.com/repos/jiv.../net/Comet.lua
I'm not sure there is an event when a song has ended, possible it might be generated one when the play mode changes if it's the last song. However, this is easy to test, just open a telnet connection towards port 9090 and issue a "listen" command and then play a song and see what happens in the telnet window.Erland Isaksson (My homepage)
Developer of many plugins/applets
Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )
-
2010-06-03, 12:57 #3
- Join Date
- Aug 2008
- Location
- Landenberg, PA
- Posts
- 133
Check with the dev of this app.....he is really a cool guy and I have worked with him to debug things.....I think the entire app is written in .NET.
http://www.rusticrhino.com/drlovegrove/