From 4c65d5f267f3ed70224ae6e8c26430a9571a21dd Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sun, 9 Mar 2025 09:46:35 +1100 Subject: [emacs][mpv][bashrc] emms group play fix --- emacs/.emacs.d/lisp/my/my-emms.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'emacs/.emacs.d/lisp/my/my-emms.el') diff --git a/emacs/.emacs.d/lisp/my/my-emms.el b/emacs/.emacs.d/lisp/my/my-emms.el index 054d3d9..331f309 100644 --- a/emacs/.emacs.d/lisp/my/my-emms.el +++ b/emacs/.emacs.d/lisp/my/my-emms.el @@ -448,8 +448,8 @@ under /zzz-seren/." ;; How many tracks have been from the start of the album ;; (exclusive) (past (- current-ln start-ln)) - ;; How many tracks to go (inclusive) - (remain (- end-ln current-ln)) + ;; ;; How many tracks to go (inclusive) + ;; (remain (- end-ln current-ln)) (idx (/ past my-emms-playlist-group-length)) (maybe-group-start (+ start-ln (* idx my-emms-playlist-group-length))) (group-start @@ -457,10 +457,11 @@ under /zzz-seren/." ;; Too close to the end of the album (max start-ln (- maybe-group-start my-emms-playlist-group-length)) maybe-group-start)) + (maybe-group-end (+ group-start my-emms-playlist-group-length)) (group-end - (if (<= remain my-emms-playlist-tail-group-length) + (if (<= (- end-ln maybe-group-end) my-emms-playlist-tail-group-length) end-ln - (min end-ln (+ group-start my-emms-playlist-group-length))))) + (min end-ln maybe-group-end)))) (cons group-start group-end)))) (defun my-emms-playlist-random-group () -- cgit v1.2.3