diff options
author | William Xu <william.xwl@gmail.com> | 2008-02-12 04:12:00 +0000 |
---|---|---|
committer | William Xu <william.xwl@gmail.com> | 2008-02-12 04:12:00 +0000 |
commit | 5f0591f7fe91bda35c44faa4134870a2296a9d5e (patch) | |
tree | e704c9b63ad60840db606df58c52a8a463001f5c | |
parent | 01efb7c0a107cc5412e895460b2630d33968a23d (diff) |
(emms-lastfm-radio-request-metadata-sentinel): Let `emms-track-updated' take care of updating track info.
darcs-hash:20080212041204-cfa61-b9e5ee5ad4e09a6ebe583e796e573abd18b0afa3.gz
-rw-r--r-- | emms-lastfm.el | 9 | ||||
-rw-r--r-- | emms-mode-line.el | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/emms-lastfm.el b/emms-lastfm.el index cb9b27f..2f86a8c 100644 --- a/emms-lastfm.el +++ b/emms-lastfm.el @@ -637,11 +637,12 @@ If DATA is given, it should be a list." (let ((buffer (current-buffer))) (emms-http-decode-buffer buffer) (let ((artist (emms-key-value "artist" buffer)) - (title (emms-key-value "track" buffer))) + (title (emms-key-value "track" buffer)) + (track (emms-playlist-current-selected-track))) (kill-buffer buffer) - (setq emms-mode-line-string (format emms-mode-line-format - (concat artist " - " title))) - (force-mode-line-update)))) + (emms-track-set track 'info-artist artist) + (emms-track-set track 'info-title title) + (emms-track-updated track)))) ;;; Utility functions diff --git a/emms-mode-line.el b/emms-mode-line.el index 8398532..f8cfec4 100644 --- a/emms-mode-line.el +++ b/emms-mode-line.el @@ -54,7 +54,7 @@ :group 'emms) (defun emms-mode-line-playlist-current () - "Format the currently playing song" + "Format the currently playing song." (format emms-mode-line-format (emms-track-description (emms-playlist-current-selected-track)))) |