From 311f4b998f72a0f03c1ae0792e0ba4c88f9d2dad Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 28 Mar 2024 13:48:14 +0000 Subject: mpc tweaks --- init.el | 2 +- lib/media/jao-mpc.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index 4a16614..cea0d2a 100644 --- a/init.el +++ b/init.el @@ -2972,7 +2972,7 @@ (lambda () (message "%s %s" (if (jao-mpc-mopidy-p) "mopidy" "mpd") - (jao-mpc--current-str nil t)) + (jao-mpc--current-timestr t)) (format "Master %s%%" (jao-mixer-get-level nil t))) ("d" "down" jao-mixer-master-down :transient t) ("u" "up" jao-mixer-master-up :transient t) diff --git a/lib/media/jao-mpc.el b/lib/media/jao-mpc.el index 70531e1..de737a3 100644 --- a/lib/media/jao-mpc.el +++ b/lib/media/jao-mpc.el @@ -80,10 +80,10 @@ (put-text-property 0 (length str) 'face face str) str) -(defun jao-mpc--current-timestr (times &optional current) +(defun jao-mpc--current-timestr (playing-times &optional current) (let* ((current (or current (jao-mpc--current))) (time (alist-get 'totaltime current ""))) - (if times + (if playing-times (format "%s/%s%s" (alist-get 'currenttime current "") time -- cgit v1.2.3