From 826e5c9f7420688495d1be2821324e1afccb51b4 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 24 Oct 2022 16:00:07 -0500 Subject: Fix: bad name in destructuring deserialized JSON --- downloader.lisp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'downloader.lisp') diff --git a/downloader.lisp b/downloader.lisp index 5f7077a..d7f0144 100644 --- a/downloader.lisp +++ b/downloader.lisp @@ -34,20 +34,20 @@ (codec :|acodec|) (artist :|artist|) (dur :|duration|) - (file :|filename|) + (file :|_filename|) (thumbs :|thumbnails|) (source :|webpage_url|)) (jonathan:parse (alexandria:read-file-into-string path)) (with-plist ((url :|url|)) (first thumbs) - (cons file - (list - :source source - :title title - :album album - :codec codec - :artist artist - :duration dur - :thumb-url url))))) + (values file + (list + :source source + :title title + :album album + :codec codec + :artist artist + :duration dur + :thumb-url url))))) (defun download-media (url) (with-temp-dir (tmpdir) @@ -59,4 +59,5 @@ (format nil "youtube-dl --write-info-json -x -o \"~a/~a.%(ext)s\" ~a" tmpdir tmpname url)) (when (uiop:file-exists-p trackinfo-file) - (new-track (trackinfo trackinfo-file)))))) + (multiple-value-bind (file plist) (trackinfo trackinfo-file) + (new-track file plist)))))) -- cgit v1.2.3