diff options
author | Colin Okay <colin@cicadas.surf> | 2022-10-26 16:37:26 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-10-26 16:37:26 -0500 |
commit | acebbb24c9ae406e41fb3798ccb31a95d73d2207 (patch) | |
tree | bba37f9db7a7a7f6ccc5961b8aad5a711cc95d83 | |
parent | e774af20dd3fb625f4477807cc011fac11c13f32 (diff) |
Add: intialize now playing display
-rw-r--r-- | playlist.lisp | 9 |
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))))) |