[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emms-help] Improve your playlist-mode buffer!

From: Lucas Bonnet
Subject: [emms-help] Improve your playlist-mode buffer!
Date: Wed, 07 Jun 2006 20:01:12 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.51 (gnu/linux)

Here's a little setup to add the display of time in the playlist-mode
buffer. Requires emms-standard, at least (not for Jorgen!).
Feel free to modify it.

Screenshot :
Simon Slator - Piano in the Rain [07:01]

;; Stolen and heavily adapted from TWB
(defun my-emms-info-track-description (track)
  "Return a description of the current track."
  (if (and (emms-track-get track 'info-artist)
           (emms-track-get track 'info-title))
      (let ((pmin (emms-track-get track 'info-playing-time-min))
            (psec (emms-track-get track 'info-playing-time-sec))
            (ptot (emms-track-get track 'info-playing-time))
            (art  (emms-track-get track 'info-artist))
            (tit  (emms-track-get track 'info-title)))
        (cond ((and pmin psec) (format "%s - %s [%02d:%02d]" art tit pmin psec))
              (ptot (format  "%s - %s [%02d:%02d]" art tit (/ ptot 60) (% ptot 
              (t (emms-track-simple-description track))))))

(setq emms-track-description-function 'my-emms-info-track-description)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]