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
3dad85dbad
commit
c7d9cf8356
1 changed files with 13 additions and 5 deletions
|
@ -19,11 +19,19 @@ async function main() {
|
||||||
|
|
||||||
const errors = []
|
const errors = []
|
||||||
|
|
||||||
let programs = db_programs.map(p => ({
|
let programs = db_programs
|
||||||
|
.map(p => {
|
||||||
|
if (p.titles.length) {
|
||||||
|
return {
|
||||||
site: p.site,
|
site: p.site,
|
||||||
xmltv_id: p.channel,
|
xmltv_id: p.channel,
|
||||||
lang: p.titles[0].lang
|
lang: p.titles[0].lang
|
||||||
}))
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
})
|
||||||
|
.filter(Boolean)
|
||||||
programs = _.uniqBy(programs, p => p.site + p.xmltv_id)
|
programs = _.uniqBy(programs, p => p.site + p.xmltv_id)
|
||||||
for (let program of programs) {
|
for (let program of programs) {
|
||||||
if (!guides.find(g => g.channel === program.xmltv_id)) {
|
if (!guides.find(g => g.channel === program.xmltv_id)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue