From 1b069c51e83e2db8276141d7464632e38f8dbf5f Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Wed, 7 Nov 2018 18:35:06 +0200 Subject: [PATCH] duration criteria --- src/common/download.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = {