From b369d655e470fb6539237202491dd6c836136509 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 30 Aug 2023 12:36:36 +0300 Subject: yeetube-download-video: use call-process-shell-command --- yeetube.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'yeetube.el') diff --git a/yeetube.el b/yeetube.el index fbc48a9..cd2f656 100644 --- a/yeetube.el +++ b/yeetube.el @@ -410,16 +410,15 @@ Example Usage: :raw-link (org-element-context)))) (when (string-prefix-p "http" url) (let ((default-directory yeetube-download-directory)) - (async-shell-command + (call-process-shell-command (if yeetube-download-audio-format (format "%s '%s' --extract-audio --audio-format %s" (shell-quote-argument yeetube-yt-dlp) (shell-quote-argument url) (shell-quote-argument yeetube-download-audio-format)) - (format "%s '%s'" - (shell-quote-argument yeetube-yt-dlp) - (shell-quote-argument url))) - (message "Downloading %s " url)))))) + (format "%s '%s'" (executable-find "yt-dlp") url)) + nil 0) + (message "Downloading %s " url))))) ;;;###autoload (defun yeetube-download-videos () -- cgit v1.2.3