summaryrefslogtreecommitdiffhomepage
path: root/lib/media/jao-mpris.el
diff options
context:
space:
mode:
Diffstat (limited to 'lib/media/jao-mpris.el')
-rw-r--r--lib/media/jao-mpris.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/media/jao-mpris.el b/lib/media/jao-mpris.el
index f2974ab..3bb2636 100644
--- a/lib/media/jao-mpris.el
+++ b/lib/media/jao-mpris.el
@@ -97,7 +97,7 @@
jao-mpris--current nil))
(defun jao-mpris--get (k &optional l)
- (when-let* ((v (alist-get k (or l jao-mpris--current))))
+ (when-let (v (alist-get k (or l jao-mpris--current)))
(if (consp v) (car v) v)))
(defun jao-mpris--set-current (k v)
@@ -146,7 +146,7 @@
(interactive "P")
(when refresh (jao-mpris--track))
(when jao-mpris--current
- (jao-notify (format "%s%s" (if-let* ((s (jao-mpris--get 'status)))
+ (jao-notify (format "%s%s" (if-let (s (jao-mpris--get 'status))
(format "%s: " s)
"")
(jao-mpris--format)))))
@@ -159,7 +159,7 @@
(defun jao-mpris--handler (iname properties &rest _args)
(let ((inhibit-message t))
(message "Received properties: %S from %s" properties iname))
- (when-let* ((md (caadr (assoc "Metadata" properties))))
+ (when-let (md (caadr (assoc "Metadata" properties)))
(let ((tno (caadr (assoc "xesam:trackNumber" md)))
(tlt (caadr (assoc "xesam:title" md)))
(art (caadr (assoc "xesam:artist" md)))
@@ -172,8 +172,7 @@
(jao-mpris--set-current 'artist art)
(jao-mpris--set-current 'album alb)
(jao-mpris--set-current 'length len))))
- (when-let* ((st (or (caadr (assoc "PlaybackStatus" properties))
- (jao-mpris--get 'status))))
+ (when-let (st (caadr (assoc "PlaybackStatus" properties)))
(jao-mpris--set-current 'status st)
(when (string= st "Stopped")
(dolist (k '(track title artist album length))