From 751f0b576ab425d4a786d5c7c89285370d601235 Mon Sep 17 00:00:00 2001 Message-Id: <751f0b576ab425d4a786d5c7c89285370d601235.1714749650.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 2 Jun 2020 02:53:29 +0100 Subject: [PATCH] disobedience/queue.c: Don't ramp up network activity when not playing. Organization: Straylight/Edgeware From: Mark Wooding 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. --- disobedience/queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- [mdw]