Revert to :file field if :artist or :title doesn't exist when notifying songs.

This commit is contained in:
Renaud Casenave-Péré 2011-08-04 19:03:03 +09:00
parent 1dabcb7d52
commit 8961e871fb

View file

@ -90,7 +90,9 @@ return at the end of a request.")
(defun empc-echo-song (song)
"Notify SONG."
(empc-echo-notify (concat "[" (int-to-string (+ (plist-get song :pos) 1)) "/" (int-to-string (plist-get empc-current-status :playlistlength)) "] "
(plist-get song :artist) " - " (plist-get song :title))))
(if (and (plist-get song :artist) (plist-get song :title))
(concat (plist-get song :artist) " - " (plist-get song :title))
(plist-get song :file)))))
(defun empc-make-modeline ()
"Create the string to insert into the modeline."