]> rhodes.io Git - squeeze-el.git/commitdiff
Christophe Weblog Wiki Code Publications Music
oh duh, + is url-encoded
authorChristophe Rhodes <csr21@cantab.net>
Mon, 24 Mar 2014 21:28:03 +0000 (21:28 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Mon, 24 Mar 2014 21:28:03 +0000 (21:28 +0000)
No wonder volume down was working fine and volume up not so well

squeeze.el

index c64eaef2ec337ddaf540cfdeec57f4e882cb649f..0b637ad4ed09458b4731719439825dbb7e332982 100644 (file)
@@ -61,7 +61,7 @@
 
 (defun squeeze-update-mixer-volume (player value)
   (let ((current (squeeze-player-volume player)))
-    (if (string-match "^[+-]" value)
+    (if (string-match "^[-+]" value)
         (when current
           (setf (squeeze-player-volume player) (+ current (string-to-number value))))
       (setf (squeeze-player-volume player) (string-to-number value)))))
@@ -80,8 +80,8 @@
               (player (squeeze-find-player id)))
           (squeeze-update-power player state))
         t)
-       ((string-match "^mixer volume \\([+-]?[0-9]*\\)" substring)
-        (let ((value (match-string 1 substring))
+       ((string-match "^mixer volume \\(\\(?:-\\|%2B\\)?[0-9]*\\)" substring)
+        (let ((value (url-unhex-string (match-string 1 substring)))
               (player (squeeze-find-player id)))
           (squeeze-update-mixer-volume player value))
         t))))))