chiark / gitweb /
Add new 'playafter' command to protocol, eclient and python.
[disorder] / server / play.c
index a0bd8093622f3647fa8ee004a329e8e3e5bb8daa..a9a505ff4a88becce79de2dca00000a4b21c3f51 100644 (file)
@@ -267,7 +267,7 @@ static const struct stringlist *find_player(const struct queue_entry *q) {
  * @return @ref START_OK, @ref START_HARDFAIL or @ref START_SOFTFAIL
  *
  * This makes @p actually start playing.  It calls prepare() if necessary and
- * either sends an @ref SM_START command or invokes the player itself in a
+ * either sends an @ref SM_PLAY command or invokes the player itself in a
  * subprocess.
  *
  * It's up to the caller to set @ref playing and @c playing->state (this might
@@ -515,7 +515,7 @@ static void chosen_random_track(ev_source *ev,
   if(!track)
     return;
   /* Add the track to the queue */
-  q = queue_add(track, 0, WHERE_END, origin_random);
+  q = queue_add(track, 0, WHERE_END, NULL, origin_random);
   D(("picked %p (%s) at random", (void *)q, q->track));
   queue_write();
   /* Maybe a track can now be played */
@@ -658,8 +658,8 @@ void disable_random(const char *who) {
 /* Scratching --------------------------------------------------------------- */
 
 /** @brief Scratch a track
- * @param User responsible (or NULL)
- * @param Track ID (or NULL for current)
+ * @param who User responsible (or NULL)
+ * @param id Track ID (or NULL for current)
  */
 void scratch(const char *who, const char *id) {
   struct queue_entry *q;
@@ -697,7 +697,8 @@ void scratch(const char *who, const char *id) {
      * bother if playing is disabled) */
     if(playing_is_enabled() && config->scratch.n) {
       int r = rand() * (double)config->scratch.n / (RAND_MAX + 1.0);
-      q = queue_add(config->scratch.s[r], who, WHERE_START, origin_scratch);
+      q = queue_add(config->scratch.s[r], who, WHERE_START, NULL, 
+                    origin_scratch);
     }
     notify_scratch(playing->track, playing->submitter, who,
                   xtime(0) - playing->played);