|
|
@ -72,10 +72,14 @@ async function main() {
|
|
|
|
|
|
|
|
|
|
|
|
const epgUrl = playlist.header.attrs['x-tvg-url']
|
|
|
|
const epgUrl = playlist.header.attrs['x-tvg-url']
|
|
|
|
if(epgUrl && !buffer[epgUrl] && parseEpg) {
|
|
|
|
if(epgUrl && !buffer[epgUrl] && parseEpg) {
|
|
|
|
console.log(`Loading '${epgUrl}'...`)
|
|
|
|
try {
|
|
|
|
const epg = await util.loadEPG(epgUrl)
|
|
|
|
console.log(`Loading '${epgUrl}'...`)
|
|
|
|
console.log(`Adding '${epgUrl}' to buffer...`)
|
|
|
|
const epg = await util.loadEPG(epgUrl)
|
|
|
|
buffer[epgUrl] = epg
|
|
|
|
console.log(`Adding '${epgUrl}' to buffer...`)
|
|
|
|
|
|
|
|
buffer[epgUrl] = epg
|
|
|
|
|
|
|
|
} catch(e) {
|
|
|
|
|
|
|
|
console.log(`Could not load '${epgUrl}'`)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(buffer[epgUrl]) {
|
|
|
|
if(buffer[epgUrl]) {
|
|
|
|