aboutsummaryrefslogtreecommitdiffstats
path: root/yeetube-mpv.el
diff options
context:
space:
mode:
Diffstat (limited to 'yeetube-mpv.el')
-rw-r--r--yeetube-mpv.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/yeetube-mpv.el b/yeetube-mpv.el
index 5070fd5..141e6e9 100644
--- a/yeetube-mpv.el
+++ b/yeetube-mpv.el
@@ -43,6 +43,9 @@
"Video resolution/quality.
Accepted values include: 1080, 720, 480, 360, 240, 144")
+(defvar yeetube-mpv-currently-playing nil
+ "Currently playing information.")
+
(defun yeetube-mpv-change-video-quality ()
"Change video quality."
(interactive)
@@ -81,7 +84,7 @@ Accepted values include: 1080, 720, 480, 360, 240, 144")
"Return shell quoted argument for ytdlp with RESOLUTION."
(shell-quote-argument (format "bestvideo[height<=?%s]+bestaudio/best" resolution)))
-(defun yeetube-mpv-play (input)
+(defun yeetube-mpv-play (input &optional info)
"Start yeetube process to play INPUT using mpv.
This function is not specific to just playing urls. Feel free to use
@@ -97,7 +100,9 @@ to play local files."
(when yeetube-mpv-disable-video " --no-video")))
(message (if yeetube-mpv-enable-torsocks
"yeetube: Starting mpv process (using torsocks)"
- "yeetube: Starting mpv process"))))
+ "yeetube: Starting mpv process"))
+ (setf yeetube-mpv-currently-playing (format "[%s]" info))))
+
(defun yeetube-mpv-toggle-no-video-flag ()
"Toggle no video flag for mpv player."