From fe04aca01dbbd9984945292fc9d3d6d22a714162 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Mon, 17 Aug 2026 01:05:19 +0300 Subject: [PATCH] Update validate.ts --- scripts/commands/playlist/validate.ts | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/scripts/commands/playlist/validate.ts b/scripts/commands/playlist/validate.ts index 8f420b8577..30bb066b90 100644 --- a/scripts/commands/playlist/validate.ts +++ b/scripts/commands/playlist/validate.ts @@ -53,7 +53,13 @@ async function main() { const log = new Collection() streams.forEach((stream: Stream) => { - if (stream.channel) { + if (!stream.channel) { + log.add({ + type: 'warning', + line: stream.getLine(), + message: `"${stream.url}" is missing a channel ID` + }) + } else { const channel = data.channelsKeyById.get(stream.channel) if (!channel) { log.add({ @@ -62,6 +68,23 @@ async function main() { message: `"${stream.tvgId}" is not in the database` }) } + + if (!stream.feed) { + log.add({ + type: 'warning', + line: stream.getLine(), + message: `"${stream.url}" is missing a feed ID` + }) + } else { + const feed = data.feedsKeyByStreamId.get(stream.getId()) + if (!feed) { + log.add({ + type: 'warning', + line: stream.getLine(), + message: `There is no feed with the ID "${stream.feed}" in the database for the "${stream.channel}" channel` + }) + } + } } const isDuplicate = stream.url && buffer.has(stream.url)