aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-ytdl.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-ytdl.el')
-rw-r--r--emacs/.emacs.d/lisp/my/my-ytdl.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-ytdl.el b/emacs/.emacs.d/lisp/my/my-ytdl.el
index e902722..721b299 100644
--- a/emacs/.emacs.d/lisp/my/my-ytdl.el
+++ b/emacs/.emacs.d/lisp/my/my-ytdl.el
@@ -65,13 +65,13 @@
(defvar my-ytdl-audio-download-dir "~/Downloads"
"Directory for ytdl to download audios to.")
-(defun my-ytdl-internal (urls type &optional cut-segments)
+(defun my-ytdl-internal (urls type &optional no-tor)
(my-with-default-directory (if (eq type 'video)
- my-ytdl-video-download-dir
- my-ytdl-audio-download-dir)
+ my-ytdl-video-download-dir
+ my-ytdl-audio-download-dir)
(apply 'my-start-process-with-torsocks
(append
- (list nil (format "ytdl-%s" urls) (format "*ytdl-%s*" urls)
+ (list no-tor (format "ytdl-%s" urls) (format "*ytdl-%s*" urls)
my-ytdl-program)
(if (eq type 'video) my-ytdl-video-args my-ytdl-audio-args)
(split-string urls)))))
@@ -87,5 +87,11 @@
(interactive "sURL(s): ")
(my-ytdl-internal urls 'audio))
+;;; fixme: autoload
+(defun my-ytdl-video-no-tor (urls)
+ "Download videos with ytdl."
+ (interactive "sURL(s): ")
+ (my-ytdl-internal urls 'video t))
+
(provide 'my-ytdl)
;;; my-ytdl.el ends here