.emacs.d/site-lisp/metalexpress.el
This commit is contained in:
parent
7dc3ebbcc1
commit
19524caf26
1 changed files with 8 additions and 3 deletions
|
@ -32,13 +32,18 @@
|
||||||
"http://usa7-vn.mixstream.net/listen/8248.m3u"
|
"http://usa7-vn.mixstream.net/listen/8248.m3u"
|
||||||
"The URL of the Metal Express Radio stream.")
|
"The URL of the Metal Express Radio stream.")
|
||||||
|
|
||||||
|
(defun mer-proc-filter (proc string)
|
||||||
|
(when (string-match "^ICY Info: StreamTitle='\\(.*\\)';StreamUrl='';"
|
||||||
|
string)
|
||||||
|
(message (match-string 1 string))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun metal-express-radio-start ()
|
(defun metal-express-radio-start ()
|
||||||
"Start listening to Metal Express Radio."
|
"Start listening to Metal Express Radio."
|
||||||
(interactive)
|
(interactive)
|
||||||
(async-shell-command
|
(let ((proc (start-process "metalexpress" "*Metal Express Radio*"
|
||||||
(concat "mplayer " metal-express-radio-playlist-url)
|
"mplayer" metal-express-radio-playlist-url)))
|
||||||
"*Metal Express Radio*"))
|
(set-process-filter proc #'mer-proc-filter)))
|
||||||
|
|
||||||
(defun metal-express-radio-stop ()
|
(defun metal-express-radio-stop ()
|
||||||
"Stop listening to Metal Express Radio."
|
"Stop listening to Metal Express Radio."
|
||||||
|
|
Loading…
Reference in a new issue