From 9301572babca5ec355a215e95fbfe37c462c9221 Mon Sep 17 00:00:00 2001 From: freearhey Date: Mon, 12 Aug 2019 00:28:51 +0300 Subject: [PATCH] Update format.js Added --epg attribute to format script (making EPG parsing optional) --- helpers/format.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpers/format.js b/helpers/format.js index e57a18f465..fd21a5948d 100644 --- a/helpers/format.js +++ b/helpers/format.js @@ -1,6 +1,7 @@ const util = require('./util') const debug = false +const parseEpg = process.env.npm_config_epg || false let stats = { total: 0, @@ -56,7 +57,7 @@ async function main() { } const epgUrl = playlist.attrs['x-tvg-url'] - if(epgUrl && !buffer[epgUrl]) { + if(epgUrl && !buffer[epgUrl] && parseEpg) { console.log(`Loading '${epgUrl}'...`) const epg = await util.loadEPG(epgUrl) console.log(`Adding '${epgUrl}' to buffer...`)