.emacs.d/site-lisp/metalexpress.el

This commit is contained in:
Tom Willemsen 2012-11-27 11:12:33 +01:00
parent 7dc3ebbcc1
commit 19524caf26

View file

@ -32,13 +32,18 @@
"http://usa7-vn.mixstream.net/listen/8248.m3u"
"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
(defun metal-express-radio-start ()
"Start listening to Metal Express Radio."
(interactive)
(async-shell-command
(concat "mplayer " metal-express-radio-playlist-url)
"*Metal Express Radio*"))
(let ((proc (start-process "metalexpress" "*Metal Express Radio*"
"mplayer" metal-express-radio-playlist-url)))
(set-process-filter proc #'mer-proc-filter)))
(defun metal-express-radio-stop ()
"Stop listening to Metal Express Radio."