aboutsummaryrefslogtreecommitdiffstats
path: root/yeetube.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-06-14 10:48:47 +0300
committerThanos Apollo <[email protected]>2024-06-14 10:50:48 +0300
commitc6e759276c80f973fd9a7d095c08c85d983a580d (patch)
tree5552c35dc7ac9de043feb7530bc356358260d4b9 /yeetube.el
parent956a195978f1738b518f6c692e53cb98778618cc (diff)
yeetube-download-video: Add optional arg for url
Diffstat (limited to 'yeetube.el')
-rw-r--r--yeetube.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/yeetube.el b/yeetube.el
index b6828d0..6780b8b 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -563,10 +563,13 @@ Optional values:
(call-process-shell-command command nil 0)))
;;;###autoload
-(defun yeetube-download-video ()
- "Download entry at point in *yeetube* buffer with yt-dlp."
+(defun yeetube-download-video (&optional url)
+ "Download entry at point in *yeetube* buffer with yt-dlp.
+
+Content will be downloaded at `yeetube-download-directory'.
+Optionally, provide custom own URL."
(interactive)
- (let ((url (yeetube-get-url)))
+ (let ((url (or url (yeetube-get-url))))
(when (string-prefix-p "http" url)
(let ((default-directory yeetube-download-directory))
(yeetube-download--ytdlp url nil yeetube-download-audio-format)