- error(0, "unknown queue id %s", id);
- else switch(q->state) {
- case playing_isscratch:
- case playing_failed:
- case playing_no_player:
- case playing_ok:
- case playing_quitting:
- case playing_scratched:
- error(0, "does not make sense to scratch %s", id);
- break;
- case playing_paused: /* started but paused */
- case playing_started: /* started to play */
+ disorder_error(0, "unknown queue id %s", id);
+ else if(q->origin == origin_scratch)
+ /* can't scratch scratches */
+ disorder_error(0, "does not make sense to scratch or remove %s", id);
+ else if(q->state == playing_paused
+ || q->state == playing_started)
+ /* removing the playing track = scratching */