aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorforcer <forcer>2005-09-20 17:52:00 +0000
committerforcer <mwolson@gnu.org>2005-09-20 17:52:00 +0000
commit7678cf90a7e74f78a0651b07085aca5de2650a68 (patch)
tree271c8bd95d933098bfb3b8f40479fa04f95f38e8
parent9ed18917952044ca8d98812c7c5e3b12cc82041c (diff)
emms-info-track-description: Fall back to old behavior if no title and artist
darcs-hash:20050920175244-2189f-b1e1413fde30472f7b6d974c7c4a2119f6523dd5.gz
-rw-r--r--emms-info.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/emms-info.el b/emms-info.el
index 8c1743c..ea427d6 100644
--- a/emms-info.el
+++ b/emms-info.el
@@ -93,9 +93,11 @@ Return zero otherwise."
(defun emms-info-track-description (track)
"Return a description of the current track."
- (format "%s - %s"
- (emms-track-get track 'info-artist)
- (emms-track-get track 'info-title)))
+ (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))))
(provide 'emms-info)
;;; emms-info.el ends here