/** @brief Track is playing but the server is quitting */
playing_quitting,
- /** @brief Track was randomly chosen and has not been played
+ /** @brief OBSOLETE
*
- * This is going to become obsolete eventually; it's equivalent to @ref
- * playing_unplayed but for tracks with a different origin.
+ * Formerly this meant a track that was picked at random and has not yet been
+ * played. This situation is now indicated by @p playing_unplayed and @p
+ * origin_random (or @p origin_adopted).
*/
playing_random,
return;
/* Add the track to the queue */
q = queue_add(track, 0, WHERE_END, origin_random);
- q->state = playing_random;
D(("picked %p (%s) at random", (void *)q, q->track));
queue_write();
/* Maybe a track can now be played */
/* Fix up origin field as best we can; will be wrong in some cases but
* hopefully not too horribly so. */
q->origin = q->submitter ? origin_picked : origin_random;
- if(q->state == playing_isscratch)
+ switch(q->state) {
+ case playing_isscratch:
q->origin = origin_scratch;
+ break;
+ case playing_random:
+ q->state = playing_unplayed;
+ break;
+ default:
+ break;
+ }
}
if(head == &qhead
&& (!q->track