Add ytel
This commit is contained in:
parent
07f56f870f
commit
bc902ff38e
16
init.el
16
init.el
|
@ -2373,6 +2373,22 @@ If used with a numeric prefix argument N, N backticks will be inserted."
|
|||
|
||||
(setup (:straight xr))
|
||||
|
||||
(setup (:straight-if ytel
|
||||
(executable-find "mpv"))
|
||||
;; This might need to be changed depending on whether the instance goes down.
|
||||
(:option ytel-invidious-api-url "https://invidious.snopyta.org")
|
||||
(:bind "y"
|
||||
(defun ytel-watch () ; This could possibly use `browse-url'.
|
||||
"Stream video at point in mpv."
|
||||
(interactive)
|
||||
(let* ((video (ytel-get-current-video))
|
||||
(id (ytel-video-id video)))
|
||||
(start-process "ytel mpv" nil
|
||||
"mpv"
|
||||
(concat "https://www.youtube.com/watch?v=" id)
|
||||
"--ytdl-format=bestvideo[height<=?720]+bestaudio/best")
|
||||
(message "Starting streaming...")))))
|
||||
|
||||
(setup (:straight zzz-to-char)
|
||||
|
||||
(:global "M-z"
|
||||
|
|
Loading…
Reference in New Issue