X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=media-mplayer.el;h=77f15169f047bc6316a43fc4e463a976d6cce424;hb=1ecbbd03909c6f7dda43117d8e8054a39427cb61;hp=4a6209f4476531a847afe1a2c989c39e083f19b5;hpb=9ce1b351cb837d2176bfcc75bc94e616449c61ff;p=elisp.git diff --git a/media-mplayer.el b/media-mplayer.el index 4a6209f..77f1516 100644 --- a/media-mplayer.el +++ b/media-mplayer.el @@ -80,9 +80,21 @@ 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))) + (progn + ;; (message "ICY Info \"%s\"" param) + (if (string-match "StreamTitle='\\([^;]*\\)';" param) + (setq media/current-song-in-stream + (let ((s (match-string 1 param))) + (concat (if (string= s "") "" s) + " | " + ;; (current-time-string) + (format-time-string "%a %b %d %H:%M:%S") + ))) + (setq media/current-song-in-stream nil) + (message "ICY Info \"%s\"" param)) + (if (and media/current-song-in-stream media/current-information) + (media/show-current-information))) + ) ;; ---------------------------------------- @@ -179,7 +191,8 @@ load Emacs less. Nil means no timing." (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:\\|ICY Info:\\) *\\(.*\\)$" line) - (media/mplayer/filter-subfunctions (match-string 1 line) (match-string 2 line))))) + (media/mplayer/filter-subfunctions (match-string 1 line) (match-string 2 line)))) + ) (setq media/mplayer/buffer (substring media/mplayer/buffer start))) )