[EMMS] Display performer even when no artist is given

This commit is contained in:
Daniel - 2019-06-10 08:05:25 +02:00
parent 076fc384db
commit 2b13606f9b
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 11 additions and 8 deletions

View File

@ -72,14 +72,17 @@ This function can be used as a value for `emms-track-description-function."
'face 'emms-browser-album-face)))
(if (not (seq-empty-p title))
(concat (format "“%s”" title)
(cond ((not (seq-empty-p composer))
(if (seq-empty-p performer)
(format " by %s" composer)
(if (string= composer performer)
(format " by %s" composer)
(format " by %s, performed by %s" composer performer))))
((not (seq-empty-p artist))
(format " by %s" artist)))
(let* ((first-entry (cond ((not (seq-empty-p composer))
composer)
((not (seq-empty-p artist))
artist)))
(second-entry (when (and (not (seq-empty-p performer))
(not (string= performer first-entry)))
performer)))
(when first-entry
(if second-entry
(format " by %s, performed by %s" first-entry second-entry)
(format " by %s" first-entry))))
(and (not (seq-empty-p album))
(format " (%s)" album)))
(string-remove-prefix (expand-file-name emms-source-file-default-directory)