[EMMS] Simplify description of current track

This commit is contained in:
Daniel - 2017-08-26 11:38:20 +02:00
parent 2cd264d7ef
commit 2265f89bad
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 18 additions and 23 deletions

View File

@ -123,9 +123,8 @@ This function can be used as a value for `emms-track-description-function."
(performer (propertize (emms-track-get track 'info-performer "") (performer (propertize (emms-track-get track 'info-performer "")
'face 'emms-browser-performer-face)) 'face 'emms-browser-performer-face))
(title (propertize (emms-track-get track 'info-title "") (title (propertize (emms-track-get track 'info-title "")
'face 'emms-browser-track-face)) 'face 'emms-browser-track-face)))
(note (emms-track-get track 'info-note ""))) (if (not (seq-empty-p title))
(let ((main-description (if (not (seq-empty-p title))
(cond (cond
((and (not (seq-empty-p composer)) ((and (not (seq-empty-p composer))
(not (seq-empty-p performer))) (not (seq-empty-p performer)))
@ -141,11 +140,7 @@ This function can be used as a value for `emms-track-description-function."
(t (t
title)) title))
(string-remove-prefix (expand-file-name emms-source-file-default-directory) (string-remove-prefix (expand-file-name emms-source-file-default-directory)
(emms-track-simple-description track)))) (emms-track-simple-description track)))))
(note (if (seq-empty-p note)
""
(concat " [" note "]"))))
(concat main-description note))))
(setq emms-track-description-function (setq emms-track-description-function
'db/emms-track-description) 'db/emms-track-description)