emms-help
[Top][All Lists]
Advanced

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

[emms-help] Function for sorting by mtime


From: Russell Carden
Subject: [emms-help] Function for sorting by mtime
Date: Thu, 23 Aug 2012 09:26:16 -0500
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2

Hello all,

I like to sort my music by the date when I purchased it when generally corresponds to the last modified time. For this reason, I have been hestitant to switch to emms for my music manager. I learned a little lisp and came up with the following function which I have added to my emms-playlist-sort.el

(defun emms-playlist-sort-by-mtime ()
  "Sort emms playlist by info-mtime, increasingly."
  (interactive)
  (emms-playlist-sort
   (lambda (a b)
     (time-less-p (append (emms-track-get a 'info-mtime) '(0) )
                  (append (emms-track-get b 'info-mtime) '(0) ))
)))




reply via email to

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