Update format.js
Added --epg attribute to format script (making EPG parsing optional)
This commit is contained in:
parent
83ce748c6f
commit
9301572bab
@ -1,6 +1,7 @@
|
|||||||
const util = require('./util')
|
const util = require('./util')
|
||||||
|
|
||||||
const debug = false
|
const debug = false
|
||||||
|
const parseEpg = process.env.npm_config_epg || false
|
||||||
|
|
||||||
let stats = {
|
let stats = {
|
||||||
total: 0,
|
total: 0,
|
||||||
@ -56,7 +57,7 @@ async function main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const epgUrl = playlist.attrs['x-tvg-url']
|
const epgUrl = playlist.attrs['x-tvg-url']
|
||||||
if(epgUrl && !buffer[epgUrl]) {
|
if(epgUrl && !buffer[epgUrl] && parseEpg) {
|
||||||
console.log(`Loading '${epgUrl}'...`)
|
console.log(`Loading '${epgUrl}'...`)
|
||||||
const epg = await util.loadEPG(epgUrl)
|
const epg = await util.loadEPG(epgUrl)
|
||||||
console.log(`Adding '${epgUrl}' to buffer...`)
|
console.log(`Adding '${epgUrl}' to buffer...`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user