aboutsummaryrefslogtreecommitdiffhomepage
path: root/playlist.lisp
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-11-01 07:17:52 -0500
committerColin Okay <colin@cicadas.surf>2022-11-01 07:17:52 -0500
commita752a72e791ba1058ba64753eb2a8e803eec01f8 (patch)
tree6745a5cd6a41f1c64cd262bc945908986f7875aa /playlist.lisp
parentfaf0b97ad184ac447b28f133d9ee4c9534a9328b (diff)
Fix: playback selection after playlist end wasn't working
Diffstat (limited to 'playlist.lisp')
-rw-r--r--playlist.lisp20
1 files changed, 10 insertions, 10 deletions
diff --git a/playlist.lisp b/playlist.lisp
index c2adf97..1b55561 100644
--- a/playlist.lisp
+++ b/playlist.lisp
@@ -169,17 +169,17 @@
(defun play-this-audio (audio)
(when-let (ctl (cur-playlist-ctl audio))
- (let ((np (now-playing-track ctl)))
+ (let ((np (now-playing-track ctl))
+ (tr (track-ctl-with-audio ctl audio)))
(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))))))
+ ((and np (eq audio (audio np)) (pausedp audio))
+ (start-playback ctl))
+
+ (t
+ (stop-playback ctl)
+ (setf (now-playing-track ctl) tr)
+ (start-playback ctl)
+ (load-now-playing-display ctl tr))))))
;;; SYNCHRONZIED CLIENT CONTROL