From: Mark Wooding Date: Tue, 2 Jun 2020 01:53:29 +0000 (+0100) Subject: disobedience/queue.c: Don't ramp up network activity when not playing. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/751f0b576ab425d4a786d5c7c89285370d601235 disobedience/queue.c: Don't ramp up network activity when not playing. If you paused the current track, or disabled playing, then Disobedience would send a `queue' command every second, eating about 2.5 kB/s of network for no good reason. Fix this. --- diff --git a/disobedience/queue.c b/disobedience/queue.c index 95ff0d5..748b8e3 100644 --- a/disobedience/queue.c +++ b/disobedience/queue.c @@ -140,7 +140,7 @@ static gboolean playing_periodic(gpointer attribute((unused)) data) { * do it once a minute then the rest of the queue can get out of date too * easily.) */ struct queue_entry *q = ql_queue.q; - if(q) { + if(q && playing_track && !(last_state&(DISORDER_TRACK_PAUSED))) { if(q == playing_track) q = q->next; if(q) {