mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 02:16:40 -05:00
Update validate.js
This commit is contained in:
@@ -19,11 +19,19 @@ async function main() {
|
||||
|
||||
const errors = []
|
||||
|
||||
let programs = db_programs.map(p => ({
|
||||
site: p.site,
|
||||
xmltv_id: p.channel,
|
||||
lang: p.titles[0].lang
|
||||
}))
|
||||
let programs = db_programs
|
||||
.map(p => {
|
||||
if (p.titles.length) {
|
||||
return {
|
||||
site: p.site,
|
||||
xmltv_id: p.channel,
|
||||
lang: p.titles[0].lang
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
})
|
||||
.filter(Boolean)
|
||||
programs = _.uniqBy(programs, p => p.site + p.xmltv_id)
|
||||
for (let program of programs) {
|
||||
if (!guides.find(g => g.channel === program.xmltv_id)) {
|
||||
|
||||
Reference in New Issue
Block a user