From c3e5cd9fab5de32171126a473186c07776e30519 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Sun, 3 Dec 2023 20:52:08 +0300 Subject: [PATCH] Update validate.ts --- scripts/commands/channels/validate.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/commands/channels/validate.ts b/scripts/commands/channels/validate.ts index acaece8b..35ab873b 100644 --- a/scripts/commands/channels/validate.ts +++ b/scripts/commands/channels/validate.ts @@ -59,6 +59,13 @@ async function main() { totalErrors++ } + if (!langs.where('1', channel.lang)) { + errors.push({ type: 'wrong_lang', ...channel }) + totalErrors++ + } + + if (!channel.xmltv_id) return + const foundChannel = channels.first( (_channel: ApiChannel) => _channel.id === channel.xmltv_id ) @@ -76,11 +83,6 @@ async function main() { // errors.push({ type: 'closed', ...channel }) // totalErrors++ // } - - if (!langs.where('1', channel.lang)) { - errors.push({ type: 'wrong_lang', ...channel }) - totalErrors++ - } }) if (errors.length) {