From 5f0591f7fe91bda35c44faa4134870a2296a9d5e Mon Sep 17 00:00:00 2001 From: William Xu Date: Tue, 12 Feb 2008 04:12:00 +0000 Subject: (emms-lastfm-radio-request-metadata-sentinel): Let `emms-track-updated' take care of updating track info. darcs-hash:20080212041204-cfa61-b9e5ee5ad4e09a6ebe583e796e573abd18b0afa3.gz --- emms-lastfm.el | 9 +++++---- 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)))) -- cgit v1.2.3