summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yeetube-mpv.el7
-rw-r--r--yeetube.el3
2 files changed, 8 insertions, 2 deletions
diff --git a/yeetube-mpv.el b/yeetube-mpv.el
index 4bab5e9..2e8325a 100644
--- a/yeetube-mpv.el
+++ b/yeetube-mpv.el
@@ -93,6 +93,8 @@ Accepted values include: 1080, 720, 480, 360, 240, 144")
(defun yeetube-mpv-play (input &optional info)
"Start yeetube process to play INPUT using mpv.
+INFO: Information to display with `yeetube-mpv-modeline-mode'
+
This function is not specific to just playing urls. Feel free to use
to play local files."
(let ((yeetube-mpv-path (executable-find "mpv")))
@@ -110,7 +112,10 @@ to play local files."
(setf yeetube-mpv-currently-playing (format "[%s]" info))))
(define-minor-mode yeetube-mpv-modeline-mode
- "Minor mode for showing currently playing information on the modeline."
+ "Minor mode for showing currently playing information on the modeline.
+
+To use this mode, you should set `yeetube-play-function' to
+`yeetube-mpv-play'."
:global t
:group 'yeetube
:lighter nil
diff --git a/yeetube.el b/yeetube.el
index 3eb5ad3..838cfc1 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -228,7 +228,8 @@ Keywords:
(interactive)
(let* ((video-url (yeetube-get-url))
(video-title (yeetube-get :title))
- (proc (funcall yeetube-play-function video-url (when yeetube-mpv-modeline-mode video-title))))
+ (proc (apply yeetube-play-function video-url
+ (when yeetube-mpv-modeline-mode (list video-title)))))
(when (processp proc)
(process-put proc :now-playing video-title))
(push (list :url video-url :title video-title) yeetube-history)