* anything. */
if(q == qhead.next && playing)
prepare(c->ev, q);
- sink_writes(ev_writer_sink(c->w), "250 queued\n");
+ sink_printf(ev_writer_sink(c->w), "252 %s\n", q->id);
/* If the queue was empty but we are for some reason paused then
* unpause. */
if(!playing) resume_playing(0);
if(vec[1][0] != '_' && (v = trackdb_get(vec[0], vec[1])))
sink_printf(ev_writer_sink(c->w), "252 %s\n", v);
else
- sink_writes(ev_writer_sink(c->w), "550 not found\n");
+ sink_writes(ev_writer_sink(c->w), "555 not found\n");
return 1;
}
return 0;
}
-static void post_move_cleanup(void) {
- struct queue_entry *q;
-
- /* If we have caused any random tracks to not be at the end then we make them
- * no longer be random. */
- for(q = qhead.next; q != &qhead; q = q->next)
- if(q->state == playing_random && q->next != &qhead)
- q->state = playing_unplayed;
- /* That might mean we need to add a new random track. */
- add_random_track();
- queue_write();
-}
-
static int c_move(struct conn *c,
char **vec,
int attribute((unused)) nvec) {
return 1;
}
n = queue_move(q, atoi(vec[1]), c->who);
- post_move_cleanup();
sink_printf(ev_writer_sink(c->w), "252 %d\n", n);
/* If we've moved to the head of the queue then prepare the track. */
if(q == qhead.next)
return 1;
}
queue_moveafter(q, nvec, qs, c->who);
- post_move_cleanup();
sink_printf(ev_writer_sink(c->w), "250 Moved tracks\n");
/* If we've moved to the head of the queue then prepare the track. */
if(q == qhead.next)
if(s)
sink_printf(ev_writer_sink(c->w), "252 %s\n", s);
else
- sink_writes(ev_writer_sink(c->w), "550 not found\n");
+ sink_writes(ev_writer_sink(c->w), "555 not found\n");
return 1;
}