From 49a1cf6766f2cf5cc28c7cdf5b234a80f4d02364 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 31 Oct 2022 07:15:40 -0500 Subject: Fix: looping playback --- playlist.lisp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/playlist.lisp b/playlist.lisp index b5c2c87..abb8e3d 100644 --- a/playlist.lisp +++ b/playlist.lisp @@ -135,11 +135,14 @@ (defun advance-now-playing (e) (when-let ((ctl (cur-playlist-ctl e))) - (stop-playback ctl) - (when-let (next (find-next-track ctl (now-playing-track ctl))) - (setf (now-playing-track ctl) next) - (load-now-playing-display ctl next) - (start-playback ctl)))) + + (if-let (next (find-next-track ctl (now-playing-track ctl))) + (progn + (stop-playback ctl) + (setf (now-playing-track ctl) next) + (load-now-playing-display ctl next) + (start-playback ctl)) + (stop-playback ctl)))) (defun previous-now-playing (e) (when-let* ((ctl -- cgit v1.2.3