diff options
author | Yuchen Pei <id@ypei.org> | 2025-03-09 09:46:35 +1100 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2025-03-09 09:46:35 +1100 |
commit | 4c65d5f267f3ed70224ae6e8c26430a9571a21dd (patch) | |
tree | 24c93ea5d2ae8f32e2e49e861a5b6504229f1fa1 /emacs/.emacs.d/lisp/my/my-emms.el | |
parent | 91a65da0359839fd5d4c95d62d49fabffad8998a (diff) |
[emacs][mpv][bashrc] emms group play fix
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-emms.el')
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-emms.el | 9 |
1 files changed, 5 insertions, 4 deletions
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 () |