summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-10-26 14:30:38 -0500
committerColin Okay <colin@cicadas.surf>2022-10-26 14:30:38 -0500
commit45c122f4df54d926e8c62ff94dfb1a6779f8370b (patch)
tree1cd686497f3e573201571af926abdc7ae9f1f46f
parentb500349671a80de641a18b9a28125071e7dfa6e7 (diff)
Fix: dom manip in fetch track callback
-rw-r--r--playlist.lisp16
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)))))