mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update validate.ts
This commit is contained in:
parent
81f52d5bcc
commit
fd58996a15
1 changed files with 14 additions and 1 deletions
|
@ -59,11 +59,24 @@ async function main() {
|
||||||
totalErrors++
|
totalErrors++
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channels.missing((_channel: ApiChannel) => _channel.id === channel.xmltv_id)) {
|
const foundChannel = channels.first(
|
||||||
|
(_channel: ApiChannel) => _channel.id === channel.xmltv_id
|
||||||
|
)
|
||||||
|
if (!foundChannel) {
|
||||||
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 (!langs.where('1', channel.lang)) {
|
if (!langs.where('1', channel.lang)) {
|
||||||
errors.push({ type: 'wrong_lang', ...channel })
|
errors.push({ type: 'wrong_lang', ...channel })
|
||||||
totalErrors++
|
totalErrors++
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue