From a7f98c81e7e69313ec8bf7c029aa9728913bc9a4 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Mon, 24 Mar 2014 21:28:03 +0000 Subject: [PATCH] oh duh, + is url-encoded No wonder volume down was working fine and volume up not so well --- squeeze.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)))))) -- 2.39.5