chiark / gitweb /
send "playing" at start of log; document log state updates
authorRichard Kettlewell <rjk@greenend.org.uk>
Sun, 30 Sep 2007 21:58:40 +0000 (22:58 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sun, 30 Sep 2007 21:58:40 +0000 (22:58 +0100)
doc/disorder_protocol.5.in
server/server.c

index d3ad537aee8d47f81b77423cd49622cb1275298e..07fada9bd9694505170f347e7ced345dd9cc5008 100644 (file)
@@ -408,6 +408,9 @@ Queue entry \fIID\fR was removed.  This is used both for explicit removal (when
 Some state change occurred.  The current set of keywords is:
 .RS
 .TP
+.B completed
+The current track completed successfully.
+.TP
 .B disable_play
 Playing was disabled.
 .TP
@@ -420,11 +423,23 @@ Playing was enabled.
 .B enable_random
 Random play was enabled.
 .TP
+.B failed
+The current track failed.
+.TP
 .B pause
 The current track was paused.
 .TP
+.B playing
+A track started playing.
+.TP
 .B resume
 The current track was resumed.
+.TP
+.B scratched
+The current track was scratched.
+.PP
+To simplify client implementation, \fBstate\fR commands reflecting the current
+state are sent at the start of the log.
 .RE
 .TP
 .B volume \fILEFT\fR \fIRIGHT\fR
index cb7714e16b2ac82ef5d496fd7d508bb7f1133d8a..1d3e682c78b30aa9d4e33edae59346b55e8e09a1 100644 (file)
@@ -759,6 +759,9 @@ static int c_log(struct conn *c,
   sink_printf(ev_writer_sink(c->w), "%"PRIxMAX" state %s\n",
              (uintmax_t)now, 
              paused ? "pause" : "resume");
+  if(playing)
+    sink_printf(ev_writer_sink(c->w), "%"PRIxMAX" state playing\n",
+               (uintmax_t)now);
   c->lo = xmalloc(sizeof *c->lo);
   c->lo->fn = logclient;
   c->lo->user = c;