summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-05-31 21:00:09 +0100
committerjao <jao@gnu.org>2021-05-31 21:00:09 +0100
commitf44ed3c3ecee463e7d9ee742aaee6950e9f6cfff (patch)
tree51386004670a0d235fa8a0fd749d77e1c13f15a3 /lib
parent08876c776d423cd0d5f651bdc054cb6d48aae7fc (diff)
downloadelibs-f44ed3c3ecee463e7d9ee742aaee6950e9f6cfff.tar.gz
elibs-f44ed3c3ecee463e7d9ee742aaee6950e9f6cfff.tar.bz2
mpc: automatic next random album
Diffstat (limited to 'lib')
-rw-r--r--lib/media/jao-mpc.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/media/jao-mpc.el b/lib/media/jao-mpc.el
index 6531a8d..89509ec 100644
--- a/lib/media/jao-mpc.el
+++ b/lib/media/jao-mpc.el
@@ -112,7 +112,9 @@
(when ok
(setq jao-mpc--current (jao-mpc--parse-retort txt))
(jao-mpc--update-minibuffer)
- (when next (funcall next))))))
+ (cond (next (funcall next))
+ ((and (null jao-mpc--current) jao-random-album-p)
+ (jao-random-album-next)))))))
(jao-mpc--send "currentsong" cb)))
(defun jao-mpc--watcher (_conn _subsys)