Improved progress tracking disabling.
authorplugd <plugd@thelambdalab.xyz>
Sun, 9 Apr 2023 15:27:29 +0000 (17:27 +0200)
committerplugd <plugd@thelambdalab.xyz>
Sun, 9 Apr 2023 15:27:29 +0000 (17:27 +0200)
emus.el

diff --git a/emus.el b/emus.el
index 7b65d87..d0a972d 100644 (file)
--- a/emus.el
+++ b/emus.el
@@ -339,20 +339,22 @@ by the filesystem."
                   (guard emus-continuous-playback)
                   (guard (eq emus-state 'playing)))
              (emus-play-next))
-            ((rx (: string-start
-                    "@I ICY-META: StreamTitle="
-                    (let str (+ (not ";")))
-                    ";"))
+            ((and (guard emus-progress-enabled)
+                  (rx (: string-start
+                         "@I ICY-META: StreamTitle="
+                         (let str (+ (not ";")))
+                         ";")))
              (message (concat "Emus: Playing stream " str)))
-            ((rx (: string-start
-                    "@F "
-                    (+ digit)
-                    " "
-                    (+ digit)
-                    " "
-                    (let left-str (+ (not " ")))
-                    " "
-                    (let right-str (+ any))))
+            ((and (guard emus-progress-enabled)
+                  (rx (: string-start
+                         "@F "
+                         (+ digit)
+                         " "
+                         (+ digit)
+                         " "
+                         (let left-str (+ (not " ")))
+                         " "
+                         (let right-str (+ any)))))
              (let* ((left (string-to-number left-str))
                     (right (string-to-number right-str))
                     (total (+ left right)))