aboutsummaryrefslogtreecommitdiffhomepage
path: root/playlist.lisp
diff options
context:
space:
mode:
authorGrant Shangreaux <grant@unabridgedsoftware.com>2023-01-08 16:01:48 -0600
committerGrant Shangreaux <grant@unabridgedsoftware.com>2023-01-08 16:01:48 -0600
commit040a7dc9970f1f402d99934f5cd5398bde4f28f8 (patch)
tree5b518703fb9cc6d293db6dc422a0ff2474f83250 /playlist.lisp
parent08e561b5e876eac0f28126a953986bea53d0d111 (diff)
Clean: code review feedback Add: extra filename cleaning
Removes the legion cluster for zipping and just uses inline zipping in a thunk before adding the link element to the DOM. Cleans more characters from filenames for the zip file. Ensures there aren't errors around deleting the zip file if it isn't there.
Diffstat (limited to 'playlist.lisp')
-rw-r--r--playlist.lisp16
1 files changed, 7 insertions, 9 deletions
diff --git a/playlist.lisp b/playlist.lisp
index b52a0a7..e320906 100644
--- a/playlist.lisp
+++ b/playlist.lisp
@@ -448,21 +448,19 @@
(editor-managment (pl)))))
(set-on-click zip-download-button
(thunk*
- (add-zip-playlist-job
- pl
- (lambda (_) (declare (ignore _))
- (let ((zip-link (make-zipped-playlist-link pl body)))
- (setf (pl-zip ctl) zip-link)
- (place-after zip-download-button zip-link)))
- (lambda (err)
- (print (format t "~a" err))))))
+ (zip-playlist pl)
+ (setf (pl-zip ctl) (make-zipped-playlist-link pl body))
+ (place-after zip-download-button (pl-zip ctl))))
(setf (pl-title ctl) title-elem
(pl-dur ctl) dur-elem
- ;; (inner-html download-elem) (pl-zip ctl)
(display input) "none"
(display title-elem) "inline")
+ (when (zipped-playlist-exists-p pl)
+ (setf (pl-zip ctl) (make-zipped-playlist-link pl body))
+ (place-after zip-download-button (pl-zip ctl)))
+
(when (playlist-editors pl)
(setf (inner-html collaborators-elem)
(with-output-to-string (out)