Update format.js

Added --epg attribute to format script (making EPG parsing optional)
This commit is contained in:
freearhey 2019-08-12 00:28:51 +03:00
parent 83ce748c6f
commit 9301572bab
1 changed files with 2 additions and 1 deletions

View File

@ -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...`)