diff --git a/src/common/download.js b/src/common/download.js index 7e1ba8c..54efbcb 100644 --- a/src/common/download.js +++ b/src/common/download.js @@ -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 = {