summaryrefslogtreecommitdiff
path: root/playlist.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'playlist.lisp')
-rw-r--r--playlist.lisp9
1 files changed, 8 insertions, 1 deletions
diff --git a/playlist.lisp b/playlist.lisp
index b28f82e..82f6f49 100644
--- a/playlist.lisp
+++ b/playlist.lisp
@@ -144,6 +144,12 @@
;;; CLIENT CONTROL
+(defun initialize-now-playing (elem)
+ (when-let (ctl (get-playlist-ctl elem))
+ (when (tracks ctl)
+ (setf (now-playing-track ctl) (first (tracks ctl)))
+ (load-now-playing-display ctl (now-playing-track ctl)))))
+
(defun load-now-playing-display (ctl track-ctl)
(let ((tr (track track-ctl)))
(setf (text (np-title ctl)) (track-title tr)
@@ -370,4 +376,5 @@
(now-playing-display (ctl))
(track-listing (pl))
(new-track-form (pl)))
- (setf (pl-title ctl) title-elem)))))
+ (setf (pl-title ctl) title-elem)
+ (initialize-now-playing body)))))