From 0eff5e178c775d6dc891f6e4a5c378481fbbed47 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Sat, 22 Jul 2023 19:19:09 +0300 Subject: [PATCH] Update create.js --- scripts/commands/report/create.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/commands/report/create.js b/scripts/commands/report/create.js index cc634dd47..df29fb360 100644 --- a/scripts/commands/report/create.js +++ b/scripts/commands/report/create.js @@ -16,6 +16,10 @@ async function main() { let channels = await api.channels.all() channels = _.keyBy(channels, 'id') + await api.blocklist.load() + let blocklist = await api.blocklist.all() + blocklist = _.keyBy(blocklist, 'channel') + await api.streams.load() let streams = await api.streams.all() streams = _.keyBy(streams, 'channel') @@ -30,6 +34,7 @@ async function main() { } if (!r.channel || !r.channel.id) result.status = 'error' + else if (blocklist[r.channel.id]) result.status = 'blocked' else if (!channels[r.channel.id]) result.status = 'invalid_id' else if (streams[r.channel.id]) result.status = 'fullfilled' else if (buffer[r.channel.id] && !r.channel.url) result.status = 'duplicate'