From f5f37a74411846104241e3ab8e289be6a61eaec3 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:32:32 +0300 Subject: [PATCH] Update validate.ts --- scripts/commands/channels/validate.ts | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/scripts/commands/channels/validate.ts b/scripts/commands/channels/validate.ts index e2f38429..60eb88c7 100644 --- a/scripts/commands/channels/validate.ts +++ b/scripts/commands/channels/validate.ts @@ -50,9 +50,9 @@ async function main() { const bufferBySiteId = new Dictionary() const errors: ValidationError[] = [] parsedChannels.forEach((channel: Channel) => { - const bufferSiteId: string = `${channel.site_id}:${channel.lang}` - if (bufferBySiteId.missing(bufferSiteId)) { - bufferBySiteId.set(bufferSiteId, true) + const bufferId: string = channel.site_id + if (bufferBySiteId.missing(bufferId)) { + bufferBySiteId.set(bufferId, true) } else { errors.push({ type: 'duplicate', ...channel }) totalErrors++ @@ -72,16 +72,6 @@ async function main() { errors.push({ type: 'wrong_xmltv_id', ...channel }) totalErrors++ } - - // if (foundChannel && foundChannel.replacedBy) { - // errors.push({ type: 'replaced', ...channel }) - // totalErrors++ - // } - - // if (foundChannel && foundChannel.closed && !foundChannel.replacedBy) { - // errors.push({ type: 'closed', ...channel }) - // totalErrors++ - // } }) if (errors.length) {