mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update validate.ts
This commit is contained in:
parent
55a6a2fecc
commit
f5f37a7441
1 changed files with 3 additions and 13 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue