From 4c8ebc1dfc0a272eff9a89648c9c69664f529eb5 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 31 Jan 2022 04:28:59 +0300 Subject: [PATCH] Update update-guides.js --- scripts/commands/update-guides.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/commands/update-guides.js b/scripts/commands/update-guides.js index fc322fe3..964226de 100644 --- a/scripts/commands/update-guides.js +++ b/scripts/commands/update-guides.js @@ -65,10 +65,15 @@ async function generateGuides() { const output = grabber.convertToXMLTV({ channels, programs }) await file.create(filepath, output) + let status = 0 + if (errors.length > 0 || !channels.length) { + status = 1 + } + await logGuide({ group: key, - count: items.length, - status: errors.length > 0 ? 1 : 0 + count: channels.length, + status }) }