From b759b18c8b327852f2e956eb76422bf7ab05e5ae Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 10 Apr 2024 06:30:57 -0500 Subject: [PATCH] small fixes to empv with my invidious instance --- README.org | 9 +++++++-- init.el | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README.org b/README.org index b55590e5..bf1eceb3 100644 --- a/README.org +++ b/README.org @@ -465,6 +465,7 @@ Let's turn auto update on for proced I think I like this interface to controlling bluetooth the most #+begin_src emacs-lisp (use-package bluetooth + :after general :general (chris/leader-keys "oT" 'bluetooth-list-devices)) @@ -4635,7 +4636,7 @@ With empv we can perhaps control mpv much more fine grainly and even search yout "i" 'empv-youtube-results-inspect "d" 'chris/empv-yt-dlp "D" 'chris/empv-yt-dlp-jellyfin) - (chris/leader-keys + (general-def :states 'normal :keymaps 'dired-mode-map "vi" 'chris/dired-empv-play-or-enqueue)) @@ -4739,8 +4740,12 @@ q quit-window (if (string= enclosure nil) link enclosure))) + (final-url (if (string-prefix-p "https://inv.cochrun.xyz/" url) + (string-replace "https://inv.cochrun.xyz/" "https://youtube.com/" url) + url)) (title (elfeed-entry-title entry))) - (empv-play-or-enqueue url) + (empv-play-or-enqueue final-url) + (message "Playing: %s from %s" title final-url) (elfeed-search-untag-all-unread))) (defun chris/empv-ytdlp-play-or-enqueue (process signal video) diff --git a/init.el b/init.el index b84a0678..af7a1865 100644 --- a/init.el +++ b/init.el @@ -229,6 +229,7 @@ (setq proced-auto-update-flag t) (use-package bluetooth + :after general :general (chris/leader-keys "oT" 'bluetooth-list-devices)) @@ -3394,7 +3395,7 @@ targets." "i" 'empv-youtube-results-inspect "d" 'chris/empv-yt-dlp "D" 'chris/empv-yt-dlp-jellyfin) - (chris/leader-keys + (general-def :states 'normal :keymaps 'dired-mode-map "vi" 'chris/dired-empv-play-or-enqueue)) @@ -3416,8 +3417,12 @@ targets." (if (string= enclosure nil) link enclosure))) + (final-url (if (string-prefix-p "https://inv.cochrun.xyz/" url) + (string-replace "https://inv.cochrun.xyz/" "https://youtube.com/" url) + url)) (title (elfeed-entry-title entry))) - (empv-play-or-enqueue url) + (empv-play-or-enqueue final-url) + (message "Playing: %s from %s" title final-url) (elfeed-search-untag-all-unread))) (defun chris/empv-ytdlp-play-or-enqueue (process signal video)