.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"
|
||||
"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."
|
||||
|
|
Loading…
Reference in a new issue