Update update.js

This commit is contained in:
Aleksandr Statciuk 2022-08-24 22:43:58 +03:00
parent f6676e05c8
commit e1bc1307ac

View file

@ -31,12 +31,11 @@ async function main() {
channels = Object.values(channels) channels = Object.values(channels)
channels = _.sortBy(channels, 'id') channels = _.sortBy(channels, 'id')
const filepath = `${PUBLIC_DIR}/guides/${key}.epg.xml` const filepath = `${PUBLIC_DIR}/guides/${key}.xml.gz`
logger.info(`Creating "${filepath}"...`) logger.info(`Creating "${filepath}"...`)
const output = generateXMLTV({ channels, programs, date: CURR_DATE }) const xmltv = generateXMLTV({ channels, programs, date: CURR_DATE })
await file.create(filepath, output) const compressed = await zip.compress(xmltv)
const compressed = await zip.compress(output) await file.create(filepath, compressed)
await file.create(filepath + '.gz', compressed)
} }
if (!total) { if (!total) {