Hi all, I just pushed a new version into the branch with improved error handling.
Now emms-info-native--decode-id3v2 returns nil in case of serious problems (missing or garbled input) *or* if there was no usable metadata in otherwise valid input file. Even though distinction between valid inputs with no meta and invalid inputs would be good for testing, I did not bother to implement it since it is not useful for EMMS itself. So if you test, please test with files that contain something useful like "album" or "title". Or you can hack the return value yourself to do the distinction, if you think it helps in testing. And speaking of testing... Yoni Rabkin <[email protected]> writes: > $ head -c 1000 file.mp3 > partial.mp3 > > ...and so partial.mp3 would be the first 1k of file.mp3. > > The question is, would that be helpful to Petteri? Sure it is helpful! If you send some clips just please make sure that they are large enough. You can use exiftool to peek the size of the ID3 Size; grab at least that amount of bytes. Before sending anything please also make sure that the file actually has an ID3 version 2.x tag. At least file should tell you that, eg: $ file 01-05-tumba.mp3 01-05-tumba.mp3: Audio file with ID3 version 2.3.0, contains:MPEG ADTS, layer III, v1, 320 kbps, 44.1 kHz, JntStereo And finally make sure that the file has at least one tag listed in ‘emms-info-native--id3v2-frame-to-info’, otherwise decoder will return nil as explained above. I used this snippet to go through all my mp3s: (dolist (file (directory-files "~/mp3/" t "mp3$")) (unless (emms-info-native--decode-id3v2 file) (message "Error: %s" file))) then it was easy to spot the failing ones from *Messages*. Thanks, Petteri
