mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 10:26:41 -05:00
Update update.js
This commit is contained in:
@@ -91,15 +91,12 @@ async function save(filepath, programs) {
|
|||||||
|
|
||||||
const xmlFilepath = `${PUBLIC_DIR}/guides/${filepath}.xml`
|
const xmlFilepath = `${PUBLIC_DIR}/guides/${filepath}.xml`
|
||||||
const gzFilepath = `${PUBLIC_DIR}/guides/${filepath}.xml.gz`
|
const gzFilepath = `${PUBLIC_DIR}/guides/${filepath}.xml.gz`
|
||||||
const jsonFilepath = `${PUBLIC_DIR}/guides/${filepath}.json`
|
|
||||||
logger.info(`creating ${xmlFilepath}...`)
|
logger.info(`creating ${xmlFilepath}...`)
|
||||||
const xmltv = generateXMLTV(output)
|
const xmltv = generateXMLTV(output)
|
||||||
await file.create(xmlFilepath, xmltv)
|
await file.create(xmlFilepath, xmltv)
|
||||||
logger.info(`creating ${gzFilepath}...`)
|
logger.info(`creating ${gzFilepath}...`)
|
||||||
const compressed = await zip.compress(xmltv)
|
const compressed = await zip.compress(xmltv)
|
||||||
await file.create(gzFilepath, compressed)
|
await file.create(gzFilepath, compressed)
|
||||||
logger.info(`creating ${jsonFilepath}...`)
|
|
||||||
await file.create(jsonFilepath, JSON.stringify(output))
|
|
||||||
|
|
||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user