From: Christophe Rhodes Date: Mon, 24 Mar 2014 21:28:03 +0000 (+0000) Subject: oh duh, + is url-encoded X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=a7f98c81e7e69313ec8bf7c029aa9728913bc9a4;p=squeeze-el.git oh duh, + is url-encoded No wonder volume down was working fine and volume up not so well --- diff --git a/squeeze.el b/squeeze.el index c64eaef..0b637ad 100644 --- a/squeeze.el +++ b/squeeze.el @@ -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))))))