diff options
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 () |