From e1bc1307acae5bc408f0ea91a95a8ea06ebcd29b Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Wed, 24 Aug 2022 22:43:58 +0300 Subject: [PATCH] Update update.js --- scripts/commands/guides/update.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/commands/guides/update.js b/scripts/commands/guides/update.js index 59e624a5..60edf5cb 100644 --- a/scripts/commands/guides/update.js +++ b/scripts/commands/guides/update.js @@ -31,12 +31,11 @@ async function main() { channels = Object.values(channels) channels = _.sortBy(channels, 'id') - const filepath = `${PUBLIC_DIR}/guides/${key}.epg.xml` + const filepath = `${PUBLIC_DIR}/guides/${key}.xml.gz` logger.info(`Creating "${filepath}"...`) - const output = generateXMLTV({ channels, programs, date: CURR_DATE }) - await file.create(filepath, output) - const compressed = await zip.compress(output) - await file.create(filepath + '.gz', compressed) + const xmltv = generateXMLTV({ channels, programs, date: CURR_DATE }) + const compressed = await zip.compress(xmltv) + await file.create(filepath, compressed) } if (!total) {