From d5809a45b5f720b3518ad315741a711904e78599 Mon Sep 17 00:00:00 2001 From: Tim Landscheidt Date: Thu, 8 Jul 2010 11:47:04 +0000 Subject: emms-info-track-description: Handle title-only tracks and fix documentation. * lisp/emms-info.el: Handle tracks without artist, but with title information gracefully and fix documentation. --- lisp/emms-info.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/emms-info.el b/lisp/emms-info.el index 9b0ffa8..2d089ac 100644 --- a/lisp/emms-info.el +++ b/lisp/emms-info.el @@ -124,12 +124,15 @@ Return nil otherwise." nil)) (defun emms-info-track-description (track) - "Return a description of the current track." + "Return a description of TRACK." (let ((artist (emms-track-get track 'info-artist)) - (title (emms-track-get track 'info-title))) - (if (and artist title) - (format "%s - %s" artist title) - (emms-track-simple-description track)))) + (title (emms-track-get track 'info-title))) + (cond + ((and artist title) + (concat artist " - " title)) + (title + title) + (emms-track-simple-description track)))) (provide 'emms-info) ;;; emms-info.el ends here -- cgit v1.2.3