diff options
author | Tim Landscheidt <tim@tim-landscheidt.de> | 2010-07-08 11:47:04 +0000 |
---|---|---|
committer | Tim Landscheidt <tim@tim-landscheidt.de> | 2010-07-08 11:47:04 +0000 |
commit | d5809a45b5f720b3518ad315741a711904e78599 (patch) | |
tree | f4e275d753b0a46f5b63f60e317808fb6a7970c7 | |
parent | 7121df96f2a8ad129de7ec105cd16dc314eee7bc (diff) |
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.
-rw-r--r-- | lisp/emms-info.el | 13 |
1 files changed, 8 insertions, 5 deletions
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 |