(Emacs/elisp/mpv)~mpv-open-video now takes optional arguments

This optional argument should be a URL we can feed for the mpv
process.
This commit is contained in:
2024-08-21 16:30:26 +01:00
parent 05d1cfdc4b
commit 2d7eab9f86

View File

@@ -48,8 +48,14 @@
(defvar mpv--history nil)
(defun mpv-open-video ()
(defun mpv-open-video (&optional arg)
(interactive)
(let ((url (if (stringp arg)
arg
(completing-read "Enter URL: " nil nil t (ffap-guesser) mpv--history))))
(mpv-start-process url)
(switch-to-buffer "*mpv*")))
(let ((url (completing-read "Enter URL: " nil nil t (ffap-guesser) mpv--history)))
(mpv-start-process url)
(switch-to-buffer "*mpv*")))