Pierre Neidhardt <[email protected]> writes:

> That does not work for me.
>
>       (emms-track-get track 'info-albumartistsort)
>
> is always nil.  So it only ever uses 'info-artist.  Something I
> missed?

Perhaps you don't have that symbol in your track database
(emms-cache-db; ~/.emacs.d/emms/cache)?

I'm using emms-print-metadata via emms-info-libtag to extract tags from
files; it returns info-albumartist and info-albumartistsort if they
exist in the input file.  I don't know if other emms-info-functions
work.

I also forgot to include this defun in my previous mail.  It grabs year
from somewhat obscure date formats like YYYY-MM.  (You get that kind of
data from MusicBrainz).

(defun ph-extract-year-from-date (date)
  "Try to extract year part from DATE.
Return DATE if the year cannot be extracted."
  (let ((year (nth 5 (parse-time-string date))))
    (if year (number-to-string year)
      (if (string-match "^[ \t]*[0-9]\\{4\\}" date)
          (substring date (match-beginning 0) (match-end 0))
        date))))


regards,
Petteri


_______________________________________________
Emms-help mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/emms-help

Reply via email to