1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-25 13:55:47 -05:00

fix(mpd): Ignore timer updates if not playing

This commit is contained in:
Michael Carlberg 2016-06-15 05:16:59 +02:00
parent 3319bd10c5
commit 7490841e55

View file

@ -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) {