emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emms-help] Album artist grouping in emms-browser


From: Petteri Hintsanen
Subject: Re: [emms-help] Album artist grouping in emms-browser
Date: Sun, 29 Oct 2017 12:52:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Pierre Neidhardt <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]