diff options
| author | jao <jao@gnu.org> | 2026-08-25 21:11:27 +0100 |
|---|---|---|
| committer | jao <jao@gnu.org> | 2026-08-25 21:11:27 +0100 |
| commit | ca31697cc95491c19ff257c29bdab3b88d043b09 (patch) | |
| tree | bc14b9744c783dd1121b36ffadf21e3d7dc0bb7a /lib/media/jao-mpris.el | |
| parent | dba7a443d0edb88869c4df70622543a465cf9304 (diff) | |
| download | elibs-ca31697cc95491c19ff257c29bdab3b88d043b09.tar.gz elibs-ca31697cc95491c19ff257c29bdab3b88d043b09.tar.bz2 | |
emacs 31main
Diffstat (limited to 'lib/media/jao-mpris.el')
| -rw-r--r-- | lib/media/jao-mpris.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/media/jao-mpris.el b/lib/media/jao-mpris.el index 80d0675..7331cf3 100644 --- a/lib/media/jao-mpris.el +++ b/lib/media/jao-mpris.el @@ -1,6 +1,6 @@ ;;; jao-mpris.el --- mpris players control -*- lexical-binding: t; -*- -;; Copyright (C) 2020, 2021, 2022, 2024, 2025 jao +;; Copyright (C) 2020, 2021, 2022, 2024, 2025, 2026 jao ;; Author: jao <mail@jao.io> ;; Keywords: multimedia @@ -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) @@ -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))) @@ -170,7 +170,7 @@ (jao-mpris--set-current 'artist art) (jao-mpris--set-current 'album alb) (jao-mpris--set-current 'length len))) - (when-let (st (caadr (assoc "PlaybackStatus" properties))) + (when-let* ((st (caadr (assoc "PlaybackStatus" properties)))) (jao-mpris--set-current 'status st) (when (string= st "Stopped") (dolist (k '(track title artist album length)) |
