leetreveil/node-musicmetadata — Issue #4: (certainly) bad id3 leads to the "metadata" event to be called lots of times
Author: dready92
Created: 2011-11-30 13:25:33+00:00
State: open

Hello,

I'm in trouble with some mp3, the "metadata" and "done" events are called a lot of time, and this of course breaks my app...
Using node.js 0.6.3 and musicmetadata 0.1.3 .

Here is my test code :

var m = require("musicmetadata");
var fs = require("fs");

var parser = new m(fs.createReadStream(process.argv[2]));

parser.on('metadata', function(result) {
console.log("metadata");
console.log(result);
});

parser.on('done', function(err) {
console.log("done");
if (err) console.log(err);
});

The x-1 times the "done" event error is [Error: Expected id3v1.1 header but was not found.] and the last time the "done" event error is [TypeError: Cannot call method 'trim' of undefined].

Note that the last time, the metadata array contains the good metadata !

How can I help you ? do you want me to send you an mp3 file having this problem, or do you have diagnostics tools I can use (I'm on Linux) to improve this bug report ?

Regards,

Mickael