From 7490841e55193105f7ddb24eef6c5cd24173dacb Mon Sep 17 00:00:00 2001
From: Michael Carlberg <c@rlberg.se>
Date: Wed, 15 Jun 2016 05:16:59 +0200
Subject: [PATCH] fix(mpd): Ignore timer updates if not playing

---
 src/modules/mpd.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/mpd.cpp b/src/modules/mpd.cpp
index 30abf021..734186a4 100644
--- a/src/modules/mpd.cpp
+++ b/src/modules/mpd.cpp
@@ -131,7 +131,7 @@ bool MpdModule::has_event()
     has_event = true;
   }
 
-  if (this->label_time || this->bar_progress) {
+  if ((this->label_time || this->bar_progress) && (this->status && this->status->state & mpd::State::PLAYING)) {
     auto now = std::chrono::system_clock::now();
 
     if (std::chrono::duration_cast<std::chrono::milliseconds>(now - this->synced_at).count() > this->sync_interval) {