aboutsummaryrefslogtreecommitdiffstats
path: root/yeetube.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-08-19 04:58:02 +0300
committerThanos Apollo <[email protected]>2023-08-19 04:58:02 +0300
commit4859618c300b8d6a35d093d24604ab1ce1268236 (patch)
tree23090a934a9b8fea0c8fbe66b6e1afaf92fd4753 /yeetube.el
parent0dc06ff5d607f6297fee66793f6a689374962293 (diff)
Add yeetube-start-mpv-process
Diffstat (limited to 'yeetube.el')
-rw-r--r--yeetube.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/yeetube.el b/yeetube.el
index f33e05a..7e06683 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -220,8 +220,12 @@ Example Usage:
(start-process-shell-command
"yeetube" nil command))))
-(defun yeetube-mpv-toggle-disable-video ()
- "Disable/Enable video for mpv player."
+(defun yeetube-start-mpv-process (url)
+ "Start yeetube process to play URL using mpv."
+ (yeetube-start-process
+ (if yeetube-mpv-disable-video
+ (format "%s --no-video %s" (executable-find "mpv") url)
+ (format "%s %s" (executable-find "mpv") url))))
(interactive)
(let ((socket (concat " --input-ipc-server=" yeetube-mpv-socket))
(no-video " --no-video")