diff options
author | Thanos Apollo <[email protected]> | 2024-02-25 04:31:56 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-02-25 04:31:56 +0200 |
commit | 6b2ad1fffe759494075793ccb53c17ca2dc2cb33 (patch) | |
tree | bf72e1be882971da453916b42209f8e6106d59f8 | |
parent | 6c17c33b76c2db5d14bee5a03c5bf47ce4cf8250 (diff) |
Refactor yeetube-get-thumbnails
-rw-r--r-- | yeetube.el | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -294,10 +294,16 @@ This is used to download thumbnails from `yeetube-content', within (unless wget-exec (error "Please install `wget', to download thumbnails")) (cl-loop for item in content - do (let ((title (plist-get item :title)) - (thumbnail (plist-get item :thumbnail))) + do (let ((thumbnail (plist-get item :thumbnail))) (call-process-shell-command - (concat "wget " (shell-quote-argument thumbnail) " -O" (shell-quote-argument title)) + (format "%s %s %s %s" wget-exec + (shell-quote-argument thumbnail) + "-O" + (concat (replace-regexp-in-string + "\\(.*\\)\\(\\(.\\{10\\}\\)\\)$" + "\\2" + thumbnail) + ".jpg")) nil 0))))) (defvar yeetube-filter-code-alist |