mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 10:26:41 -05:00
Update validate.ts
This commit is contained in:
@@ -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++
|
||||||
|
|||||||
Reference in New Issue
Block a user