diff options
author | Colin Okay <colin@cicadas.surf> | 2022-10-25 15:59:12 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-10-25 15:59:12 -0500 |
commit | b06bf4244ba6df8fc4c43ae4b1eb8deb24e66f46 (patch) | |
tree | 1cad8090cb50b77dc14c2ea2d8097995bb9aa818 | |
parent | e1010af31425cf129c43d74e7f7e2adcb21f4bf2 (diff) |
Fix: install-playlist/ctl must occur prior to adding tracks
-rw-r--r-- | vampire.lisp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vampire.lisp b/vampire.lisp index b988e27..9001643 100644 --- a/vampire.lisp +++ b/vampire.lisp @@ -224,6 +224,9 @@ (span (:content (secs-to-hms (or (track-duration track) 0))))) (audio (:source (media-url-path track) :controls nil :bind audio))) (install-audio-track audio track) + (set-on-ended + audio + (alambda (ctl/next-track audio))) (set-on-click btn (alambda (ctl/play audio))))) @@ -275,13 +278,13 @@ (playlist-key-from-url (url (location body)))) (playlist (object-with-key listid))) + (install-playlist/ctl playlist body) (with-clog-create body (div () (section (:h2 :content (playlist-title playlist))) (div () (track-listing (playlist))) - (track-form (playlist))) - (install-playlist/ctl playlist body)))) + (track-form (playlist)))))) (defun user-page (body) (if-let (user (session-user body)) |