branch: elpa/mpv
commit 4dddd55c5ea805ae19b2e7694dec2ae1ab4f683e
Author: firmart <[email protected]>
Commit: firmart <[email protected]>
Add mpv-version.
---
mpv.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/mpv.el b/mpv.el
index 54d696c34d..6ac73e5271 100644
--- a/mpv.el
+++ b/mpv.el
@@ -362,5 +362,14 @@ of \\[universal-argument] will add another `mpv-seek-step'
seconds."
(interactive)
(mpv--enqueue '("revert-seek") #'ignore))
+;;;###autoload
+(defun mpv-version ()
+ "Return mpv version."
+ (interactive)
+ (let ((version (cadr (split-string (car (process-lines "mpv"
"--version"))))))
+ (prog1 version
+ (if (called-interactively-p 'interactive)
+ (message "%s" version)))))
+
(provide 'mpv)
;;; mpv.el ends here