diff options
Diffstat (limited to 'playlist.lisp')
-rw-r--r-- | playlist.lisp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/playlist.lisp b/playlist.lisp index 503c69a..a91da0d 100644 --- a/playlist.lisp +++ b/playlist.lisp @@ -250,11 +250,12 @@ (set-on-ended audio 'advance-now-playing) (set-on-click container (alambda (play-this-audio audio))))) -(defun create-track-listing (parent pl ctl) - (let ((ol (create-ordered-list parent))) - (setf (pl-tracks ctl) ol) - (dolist (track (playlist-tracks pl)) - (create-track-list-item ol track ctl)))) +(defun create-track-listing (parent pl) + (when-let (ctl (get-playlist-ctl parent)) + (let ((ol (create-ordered-list parent))) + (setf (pl-tracks ctl) ol) + (dolist (track (playlist-tracks pl)) + (create-track-list-item ol track ctl))))) (defun append-track-list-item (obj track) (when-let (ctl (get-playlist-ctl obj)) @@ -305,7 +306,6 @@ (div () (section (:h2 :content (playlist-title-content pl) :bind title-elem)) (now-playing-display (ctl)) - (track-listing (pl ctl :bind tracks-elem)) + (track-listing (pl)) (new-track-form (pl))) - (setf (pl-title ctl) title-elem - (pl-tracks ctl) tracks-elem))))) + (setf (pl-title ctl) title-elem))))) |