aboutsummaryrefslogtreecommitdiff
path: root/emms-streams.el
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2005-09-25 16:03:00 +0000
committerMichael Olson <mwolson@gnu.org>2005-09-25 16:03:00 +0000
commitaaf97fcbd6f52b0e2a36726fe8e1f6e1eff78bb4 (patch)
tree88368de5ba24a765e811b6401bca1a113051c060 /emms-streams.el
parent5bab7a72a1a5ffc0134fa370b096925fd91c771f (diff)
emms-streams.el: Update `emms-info-file-info-song-artist' so that it
can deal with the new interface. darcs-hash:20050925160336-1bfb2-95abcbab9f4d62c6d8dee2b7a8b3b8523e4089a4.gz
Diffstat (limited to 'emms-streams.el')
-rw-r--r--emms-streams.el22
1 files changed, 11 insertions, 11 deletions
diff --git a/emms-streams.el b/emms-streams.el
index 003e4c0..a52e0f8 100644
--- a/emms-streams.el
+++ b/emms-streams.el
@@ -414,17 +414,17 @@ Don't forget to save your modifications !"
(defun emms-info-file-info-song-artist (track)
"Returns a description of TRACK, build from its comments.
-If `emms-info-methods-list' indicates how to retrieve special info
-about it, use this. Otherwise returns the name alone."
- (if (not (and track (emms-track-name track)))
- "Invalid track!"
- (let ((info (emms-info-get track)))
- (if (eq (emms-info-method-for track) 'emms-info-url)
- (progn
- (concat (emms-info-artist info) " - " (emms-info-title info)))
- (if (and info (not (string= (emms-info-artist info) "")) (not (string= (emms-info-title info) "")))
- (concat (emms-info-artist info) " - " (emms-info-title info))
- (file-name-sans-extension (file-name-nondirectory (emms-track-name track))))))))
+If the track already indicates artist and title, use it.
+Otherwise return the name of the track."
+ (let ((name (and track (emms-track-name track))))
+ (if (null name)
+ "Invalid track!"
+ (let ((artist (emms-track-get track 'info-artist))
+ (title (emms-track-get track 'info-title)))
+ (if (and artist (not (string= artist ""))
+ title (not (string= title "")))
+ (concat artist " - " title)
+ (file-name-sans-extension (file-name-nondirectory name)))))))
(defun emms-stream-add-data-to-track (track)
(emms-track-set track 'metadata emms-stream-last-stream))