started playing. If you turn off random play, then either scratch or
wait for the current track, then turn random play on again then it
would not notice the new track.
The reason is that random track choice is now asynchronous to start a
new track and Disobedience wasn't listening for "playing" log
messages. Now it does.
static void log_playing(void attribute((unused)) *v,
const char attribute((unused)) *track,
const char attribute((unused)) *user) {
+ event_raise("playing-started", 0);
}
/** @brief Called when a track is added to the queue */
static void queue_init(struct queuelike attribute((unused)) *ql) {
/* Arrange a callback whenever the playing state changes */
event_register("playing-changed", playing_changed, 0);
+ event_register("playing-started", playing_changed, 0);
/* We reget both playing track and queue at pause/resume so that start times
* can be computed correctly */
event_register("pause-changed", playing_changed, 0);