summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-07-31 03:58:06 +0100
committerjao <jao@gnu.org>2022-07-31 03:58:06 +0100
commitf8e9b2e6099dd569e971b32c3a733ea8e5e0952d (patch)
treef518365fcf006b875d75e49be637e18c15498431 /init.el
parentf11b804dbd11c6288b7847dd3ef0551323392747 (diff)
downloadelibs-f8e9b2e6099dd569e971b32c3a733ea8e5e0952d.tar.gz
elibs-f8e9b2e6099dd569e971b32c3a733ea8e5e0952d.tar.bz2
jao-mpc: playing http radio streams
Diffstat (limited to 'init.el')
-rw-r--r--init.el13
1 files changed, 5 insertions, 8 deletions
diff --git a/init.el b/init.el
index dbcf67a..c77496a 100644
--- a/init.el
+++ b/init.el
@@ -1590,12 +1590,8 @@
(defvar jao-browse--sound-rx
(format "^https?://.*/.*\\.%s" (regexp-opt '("mp4" "mp3" "flv"))))
-(defun jao-browse-add-url-to-mpc (url &rest _)
- "Add the given URL to mpc's playing list, or just play it."
- (let ((p (yes-or-no-p (format "Play %s right now?" url))))
- (when p (jao-mpc-clear))
- (jao-mpc-add-url url)
- (if p (jao-mpc-play) (message "%s added to mpc queue" url))))
+(defun jao-browse-play-sound-url (url &rest _)
+ (jao-mpc-add-or-play-url url))
(defun jao-browse-url-browse (&rest args)
(apply jao-browse-url-function args))
@@ -1608,7 +1604,7 @@
("^file://?" . jao--find-file-other-window)
(,jao-browse--external-regexp . ,jao-browse-url-external-function)
("^https?://.*\\.gotomeeting\\.com\\.*" . browse-url-chrome)
- (,jao-browse--sound-rx . jao-browse-add-url-to-mpc)
+ (,jao-browse--sound-rx . jao-browse-play-sound-url)
(,(jao-wget--regexp) . jao-download)
(jao-video--url-p . jao-maybe-view-video)
("." . jao-browse-url-browse)))
@@ -3097,7 +3093,8 @@
["Seek and search"
("f" "seek fwd" jao-player-seek-10 :transient t)
("F" "seek bwd" jao-player-seek--10 :transient t)
- ("a" "search album" jao-mpc-search-and-select-album)]
+ ("a" "search album" jao-mpc-search-and-select-album)
+ ("S" "play stream" jao-mpc-play-stream)]
["Browse"
("b" "browse" jao-player-browse)
("l" "show play list" jao-player-list)