diff options
author | Colin Okay <colin@cicadas.surf> | 2022-10-24 16:00:07 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-10-24 16:00:07 -0500 |
commit | 826e5c9f7420688495d1be2821324e1afccb51b4 (patch) | |
tree | 839fdbd529ec3b5908a7b82f97565704bb00580e /downloader.lisp | |
parent | c3d7abc48bf6081b1538037eaff8b25cb3e9389f (diff) |
Fix: bad name in destructuring deserialized JSON
Diffstat (limited to 'downloader.lisp')
-rw-r--r-- | downloader.lisp | 23 |
1 files changed, 12 insertions, 11 deletions
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)))))) |