Re: emms-info-native and track duration

Yoni Rabkin <[email protected]>
Newsgroups gmane.emacs.emms.user
Message-ID <[email protected]>
Petteri Hintsanen <[email protected]> writes:

> Yoni Rabkin <[email protected]> writes:
>
>> Works for me on both 29.1 and 28.2.
>>
>> I only got one error on one machine, and with one MP3 track. But on
>> closer inspection of that track it really doesn't start with "ID3".
>
> Thanks for testing.  Did you get sensible playing times?  That's the
> main new feature, after all.
>
> I have found out that just checking for zero length tracks in the cache
> might reveal problematic cases:
>
>   (maphash (lambda (key bdata)
>              (when (eq (alist-get 'type bdata) 'file)
>                (let ((name (alist-get 'name bdata))
>                      (playtime (or (alist-get 'info-playing-time bdata) 0)))
>                  (when (zerop playtime)
>                    (message "%s\t%d" name playtime)))))
>            emms-cache-db)
>
> For me, most of the zero length tracks are MP3s without an ID3v2 tag, or
> some other files than {Ogg, Opus, FLAC, MP3}.  All the others have quite
> correct info-playing-time.

Mine are mostly fine as well. Let me dig up archives I have and find
other things to throw at it.

-- 
   "Cut your own wood and it will warm you twice"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.