duration criteria

This commit is contained in:
Evert Prants 2018-11-07 18:35:06 +02:00
parent 2b39800228
commit 1b069c51e8
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -85,7 +85,7 @@ async function getInfos (file) {
let formatData = await asn.promiseExec(`ffprobe -i "${file}" -show_entries format -v quiet -of json`)
let parsed = JSON.parse(formatData.stdout)
if (!parsed || !parsed.format) throw new Error('Failed to parse metadata!')
if (!parsed || !parsed.format || !parsed.format.duration) throw new Error('Failed to parse metadata!')
parsed = parsed.format
let data = {