Fix ffprobe title detection

This commit is contained in:
calzoneman 2015-05-10 23:02:24 -05:00
parent e51793d60c
commit 73fc5dd724
1 changed files with 3 additions and 3 deletions

View File

@ -112,8 +112,8 @@ function parse(meta) {
data.container = meta.format.format_name.split(",")[0]; data.container = meta.format.format_name.split(",")[0];
data.bitrate = parseInt(meta.format.bit_rate) / 1000; data.bitrate = parseInt(meta.format.bit_rate) / 1000;
if (meta.format.tags) { if (meta.format["tag:title"]) {
data.title = meta.format.tags.title; data.title = meta.format["tag:title"];
} }
data.seconds = Math.ceil(parseFloat(meta.format.duration)); data.seconds = Math.ceil(parseFloat(meta.format.duration));
return data; return data;
@ -151,7 +151,7 @@ function ffprobe(filename, cb) {
data = {}; data = {};
} else { } else {
var kv = line.split("="); var kv = line.split("=");
data[kv[0]] = kv[1]; data[kv[0].toLowerCase()] = kv[1];
} }
}); });