diff options
author | Johnathan Rabkin <yonirabkin@member.fsf.org> | 2012-09-18 12:28:50 -0400 |
---|---|---|
committer | Johnathan Rabkin <yonirabkin@member.fsf.org> | 2012-09-18 12:28:50 -0400 |
commit | d5666db21b9e2832eedf4d63a35d29f7fea7135b (patch) | |
tree | d0254154faee9817b6af42e7e04790e4ef4d71fd /lisp/emms-browser.el | |
parent | 7a5eb54fa0f4a0d91213ec91263bfacc0469bc55 (diff) |
Add support for disc-number sorting of FLAC files.
Patch from Christophe Rhodes <csr21@cantab.net>.
Diffstat (limited to 'lisp/emms-browser.el')
-rw-r--r-- | lisp/emms-browser.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/emms-browser.el b/lisp/emms-browser.el index 6bff443..c52f326 100644 --- a/lisp/emms-browser.el +++ b/lisp/emms-browser.el @@ -786,6 +786,15 @@ return an empty string." (concat "0" tracknum) tracknum))))) +(defun emms-browser-disc-number (track) + "Return a string representation of a track number. +The string will end in a space. If no track number is available, +return an empty string." + (let ((discnum (emms-track-get track 'info-discnumber))) + (if (or (not (stringp discnum)) (string= discnum "0")) + "" + discnum))) + (defun emms-browser-year-number (track) "Return a string representation of a track's year. This will be in the form '(1998) '." @@ -1700,6 +1709,7 @@ If > album level, most of the track data will not make sense." ("C" . ,(emms-track-get track 'info-composer)) ("p" . ,(emms-track-get track 'info-performer)) ("t" . ,(emms-track-get track 'info-title)) + ("D" . ,(emms-browser-disc-number track)) ("T" . ,(emms-browser-track-number track)) ("d" . ,(emms-browser-track-duration track)) ("cS" . ,(emms-browser-get-cover-str path 'small)) |