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 bufferBySiteId = new Dictionary()
|
||||||
const errors: ValidationError[] = []
|
const errors: ValidationError[] = []
|
||||||
parsedChannels.forEach((channel: Channel) => {
|
parsedChannels.forEach((channel: Channel) => {
|
||||||
const bufferSiteId: string = `${channel.site_id}:${channel.lang}`
|
const bufferId: string = channel.site_id
|
||||||
if (bufferBySiteId.missing(bufferSiteId)) {
|
if (bufferBySiteId.missing(bufferId)) {
|
||||||
bufferBySiteId.set(bufferSiteId, true)
|
bufferBySiteId.set(bufferId, true)
|
||||||
} else {
|
} else {
|
||||||
errors.push({ type: 'duplicate', ...channel })
|
errors.push({ type: 'duplicate', ...channel })
|
||||||
totalErrors++
|
totalErrors++
|
||||||
|
@ -72,16 +72,6 @@ async function main() {
|
||||||
errors.push({ type: 'wrong_xmltv_id', ...channel })
|
errors.push({ type: 'wrong_xmltv_id', ...channel })
|
||||||
totalErrors++
|
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) {
|
if (errors.length) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue