mirror of https://github.com/calzoneman/sync.git
Fix ffprobe title detection
This commit is contained in:
parent
e51793d60c
commit
73fc5dd724
|
@ -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];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue