Update validate.ts

This commit is contained in:
freearhey 2023-11-15 10:26:46 +03:00
parent d9d595315d
commit 3821099e8f

View file

@ -51,14 +51,6 @@ async function main() {
const bufferBySiteId = new Dictionary()
const errors: ValidationError[] = []
parsedChannels.forEach((channel: Channel) => {
const bufferId: string = `${channel.xmltv_id}:${channel.lang}:${channel.site_id}`
if (bufferById.missing(bufferId)) {
bufferById.set(bufferId, true)
} else {
errors.push({ type: 'duplicate', ...channel })
totalErrors++
}
const bufferSiteId: string = `${channel.site_id}:${channel.lang}`
if (bufferBySiteId.missing(bufferSiteId)) {
bufferBySiteId.set(bufferSiteId, true)