projects
/
elisp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c67534a
)
Added the parsing of the ICY info to have titles playing in streams.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 10 Mar 2015 10:37:09 +0000
(11:37 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 10 Mar 2015 10:37:09 +0000
(11:37 +0100)
media-mplayer.el
patch
|
blob
|
history
diff --git
a/media-mplayer.el
b/media-mplayer.el
index
03ea5a1
..
4a6209f
100644
(file)
--- a/
media-mplayer.el
+++ b/
media-mplayer.el
@@
-68,9
+68,9
@@
load Emacs less. Nil means no timing."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun media/mplayer/filter-subfunctions (cmd param)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun media/mplayer/filter-subfunctions (cmd param)
- ;;
(unless (string= cmd "A:")
-
;;
(message "cmd=%s param=%s" cmd param)
-
;;
)
+ ;; (unless (string= cmd "A:")
+
;;
(message "cmd=%s param=%s" cmd param)
+
;;
)
(eval
(cdr
(assoc cmd
(eval
(cdr
(assoc cmd
@@
-79,6
+79,13
@@
load Emacs less. Nil means no timing."
;; ----------------------------------------
;; ----------------------------------------
+ ("ICY Info:" .
+ (if (string-match "StreamTitle='\\([^']*\\)';" param)
+ (message "Now in stream \"%s\"" (match-string 1 param))
+ (message "ICY Info \"%s\"" param)))
+
+ ;; ----------------------------------------
+
("ANS_LENGTH" .
(setq media/song-duration
("ANS_LENGTH" .
(setq media/song-duration
@@
-171,7
+178,7
@@
load Emacs less. Nil means no timing."
(string-match "\\(.*\\)[\n
\r
]+" media/mplayer/buffer start))
(setq start (1+ (match-end 1)))
(let ((line (match-string 1 media/mplayer/buffer)))
(string-match "\\(.*\\)[\n
\r
]+" media/mplayer/buffer start))
(setq start (1+ (match-end 1)))
(let ((line (match-string 1 media/mplayer/buffer)))
- (when (string-match "^\\(AUDIO:\\|Exiting...\\|Starting\\|ANS_LENGTH\\|ANS_TIME_POSITION\\|Cache fill:\\) *\\(.*\\)$" line)
+ (when (string-match "^\\(AUDIO:\\|Exiting...\\|Starting\\|ANS_LENGTH\\|ANS_TIME_POSITION\\|Cache fill:\\
|ICY Info:\\
) *\\(.*\\)$" line)
(media/mplayer/filter-subfunctions (match-string 1 line) (match-string 2 line)))))
(setq media/mplayer/buffer (substring media/mplayer/buffer start)))
)
(media/mplayer/filter-subfunctions (match-string 1 line) (match-string 2 line)))))
(setq media/mplayer/buffer (substring media/mplayer/buffer start)))
)