[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))) 'face 'emms-browser-album-face)))
(if (not (seq-empty-p title)) (if (not (seq-empty-p title))
(concat (format "“%s”" title) (concat (format "“%s”" title)
(cond ((not (seq-empty-p composer)) (let* ((first-entry (cond ((not (seq-empty-p composer))
(if (seq-empty-p performer) composer)
(format " by %s" composer) ((not (seq-empty-p artist))
(if (string= composer performer) artist)))
(format " by %s" composer) (second-entry (when (and (not (seq-empty-p performer))
(format " by %s, performed by %s" composer performer)))) (not (string= performer first-entry)))
((not (seq-empty-p artist)) performer)))
(format " by %s" artist))) (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)) (and (not (seq-empty-p album))
(format " (%s)" album))) (format " (%s)" album)))
(string-remove-prefix (expand-file-name emms-source-file-default-directory) (string-remove-prefix (expand-file-name emms-source-file-default-directory)