aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--downloader.lisp23
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))))))