From 25d906dd84479522cd53bbb96597b7375de7a61e Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 31 Oct 2022 07:20:42 -0500 Subject: Modify: clicking on tracks to make them play. --- playlist.lisp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'playlist.lisp') diff --git a/playlist.lisp b/playlist.lisp index abb8e3d..236da00 100644 --- a/playlist.lisp +++ b/playlist.lisp @@ -165,13 +165,16 @@ (defun play-this-audio (audio) (when-let (ctl (cur-playlist-ctl audio)) (let ((np (now-playing-track ctl))) - (unless (and np (eq audio (audio np))) - (let ((tr - (track-ctl-with-audio ctl audio))) - (stop-playback ctl) - (setf (now-playing-track ctl) tr) - (start-playback ctl) - (load-now-playing-display ctl tr)))))) + (cond + ((not (eq audio (audio np))) ; different track + (let ((tr + (track-ctl-with-audio ctl audio))) + (stop-playback ctl) + (setf (now-playing-track ctl) tr) + (start-playback ctl) + (load-now-playing-display ctl tr))) + ((pausedp audio) + (start-playback ctl)))))) ;;; SYNCHRONZIED CLIENT CONTROL -- cgit v1.2.3