diff options
author | Yuchen Pei <id@ypei.org> | 2024-05-26 20:55:48 +1000 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2024-05-26 20:55:48 +1000 |
commit | bcc1b224be5afe9bfb50c68f87f9c154c703b76f (patch) | |
tree | 6d8cf12350649213aec6a3c4061d26ce496f18c9 /emacs/.emacs.d/lisp | |
parent | d599975c477fe9b44a755def9c2b83a3f7de5627 (diff) |
[emacs] play video with vlc if possible
Diffstat (limited to 'emacs/.emacs.d/lisp')
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-emms.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-emms.el b/emacs/.emacs.d/lisp/my/my-emms.el index 47758f2..f4e9bc0 100644 --- a/emacs/.emacs.d/lisp/my/my-emms.el +++ b/emacs/.emacs.d/lisp/my/my-emms.el @@ -159,6 +159,16 @@ either 'audio or 'video (alist-get type my-extension-types))) (with-current-buffer to (emms-sort)))) +(defun my-emms-players-preference (track players) + "If audio, use first player, otherwise second." + (let ((name (emms-track-name track))) + (if (and (length> players 1) + (string-prefix-p "file://" name) + (member (file-name-extension name) + '("mkv" "mp4" "ogv" "avi" "webm"))) + (cadr players) + (car players)))) + (defvar my-emms-playlist-alist nil "alist controlling playlists, where the cdr of each item is an also an alist, with possible keys 'source and 'type. |