Update validate.ts

This commit is contained in:
freearhey 2023-12-03 20:52:08 +03:00
parent 3981133fea
commit c3e5cd9fab

View file

@ -59,6 +59,13 @@ async function main() {
totalErrors++ totalErrors++
} }
if (!langs.where('1', channel.lang)) {
errors.push({ type: 'wrong_lang', ...channel })
totalErrors++
}
if (!channel.xmltv_id) return
const foundChannel = channels.first( const foundChannel = channels.first(
(_channel: ApiChannel) => _channel.id === channel.xmltv_id (_channel: ApiChannel) => _channel.id === channel.xmltv_id
) )
@ -76,11 +83,6 @@ async function main() {
// errors.push({ type: 'closed', ...channel }) // errors.push({ type: 'closed', ...channel })
// totalErrors++ // totalErrors++
// } // }
if (!langs.where('1', channel.lang)) {
errors.push({ type: 'wrong_lang', ...channel })
totalErrors++
}
}) })
if (errors.length) { if (errors.length) {