« get me outta code hell

Fix runaway progress bar info - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-07-25 18:36:36 -0300
committerFlorrie <towerofnix@gmail.com>2018-07-25 18:36:36 -0300
commit07d3c36a074a544649ee8a9b5e4ca5ed44b9d9a0 (patch)
treec3bd51d282537608cdaca1e5ea6d1a05171b0143
parent0e2581f026efbfe9d8a25215ae4e06ef3e5c6a68 (diff)
Fix runaway progress bar info
-rw-r--r--ui.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 7b1d330..a7df2b3 100644
--- a/ui.js
+++ b/ui.js
@@ -298,7 +298,9 @@ class AppElement extends FocusElement {
     }
 
     this.player.on('printStatusLine', data => {
-      this.playbackInfoElement.updateProgress(data)
+      if (this.playingTrack) {
+        this.playbackInfoElement.updateProgress(data)
+      }
     })
 
     return true