mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update validate.js
This commit is contained in:
parent
2afe3ff92d
commit
2c972d2666
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
const { parser, logger, api } = require('../../core')
|
||||
const { program } = require('commander')
|
||||
const chalk = require('chalk')
|
||||
const langs = require('langs')
|
||||
|
||||
program.argument('<filepath>', 'Path to file to validate').parse(process.argv)
|
||||
|
||||
|
@ -43,6 +44,11 @@ async function main() {
|
|||
errors.push({ type: 'wrong_xmltv_id', xmltv_id: channel.id, ...channel })
|
||||
stats.errors++
|
||||
}
|
||||
|
||||
if (!langs.where('1', channel.lang)) {
|
||||
errors.push({ type: 'wrong_lang', xmltv_id: channel.id, ...channel })
|
||||
stats.errors++
|
||||
}
|
||||
}
|
||||
|
||||
if (errors.length) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue