diff options
-rw-r--r-- | vampire.lisp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vampire.lisp b/vampire.lisp index e7ce96d..d530fb3 100644 --- a/vampire.lisp +++ b/vampire.lisp @@ -111,7 +111,7 @@ (reload (location (connection-body parent))))))) (defun url-to-playlist (pl location) - (format nil "~a//~a/playlist?list=~a" + (format nil "~a//~a/playlist/~a" (protocol location) (host location) (key pl))) @@ -136,8 +136,6 @@ (pathname-name (track-file track)) (pathname-type (track-file track)))) -(create-audio ) - (defun create-track-listing (parent playlist &rest args) (declare (ignorable args)) (dolist (track (playlist-tracks playlist)) @@ -185,9 +183,12 @@ (format nil "Error whiel fetching track at: ~a~%" url))))))))) +(defun playlist-key-from-url (url) + (first (last (ppcre:split "/" (nth 4 (multiple-value-list (quri:parse-uri url))))))) + (defun playlist-page (body) (when-let* ((listid - (form-data-item (form-get-data body) "list")) + (playlist-key-from-url (url (location body)))) (playlist (object-with-key listid))) (with-clog-create body |