diff options
author | foo <foo> | 2006-05-24 19:59:00 +0000 |
---|---|---|
committer | foo <> | 2006-05-24 19:59:00 +0000 |
commit | a665f6aa63b12dd12e0156a8a799dd3a59b39e5b (patch) | |
tree | 533e9e580d77b7b374c88ebaf23713dab1f0592a | |
parent | a92fa296433cf56276b070c68ad3b9ecb1d164f9 (diff) |
emms-player-mpd: When showing the currently-playing song, prepend the name of the radio station, if it exists.
darcs-hash:20060524195911-0beec-2b18246bfdc9b627f315860265254332a2197356.gz
-rw-r--r-- | emms-player-mpd.el | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/emms-player-mpd.el b/emms-player-mpd.el index 052be3f..fe4cdcf 100644 --- a/emms-player-mpd.el +++ b/emms-player-mpd.el @@ -948,19 +948,23 @@ positive or negative." (defun emms-player-mpd-show-1 (closure response) (let* ((info (emms-player-mpd-get-alist (emms-player-mpd-parse-response response))) - (track (emms-dictionary '*track*)) (insertp (car closure)) (callback (cadr closure)) (buffer (cddr closure)) - (name (cdr (assoc "name" info))) + (name (cdr (assoc "name" info))) ; radio feeds sometimes set this + (file (cdr (assoc "file" info))) (desc nil)) (when info - (if name - (setq desc name) - (emms-track-set track 'type 'file) - (emms-track-set track 'name (cdr (assoc "file" info))) - (emms-info-mpd track info) - (setq desc (emms-track-description track)))) + (when name + (setq desc name)) + (when file + (let ((track (emms-dictionary '*track*))) + (emms-track-set track 'type 'file) + (emms-track-set track 'name file) + (emms-info-mpd track info) + (if name + (setq desc (concat name ": " (emms-track-description track))) + (setq desc (emms-track-description track)))))) (if (not desc) (message "Nothing playing right now") (setq desc (format emms-show-format desc)) |