From 040a7dc9970f1f402d99934f5cd5398bde4f28f8 Mon Sep 17 00:00:00 2001 From: Grant Shangreaux Date: Sun, 8 Jan 2023 16:01:48 -0600 Subject: 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. --- playlist.lisp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'playlist.lisp') 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) -- cgit v1.2.3