mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update update.js
This commit is contained in:
parent
c40ef23e9b
commit
80c02a6c4f
1 changed files with 2 additions and 4 deletions
|
@ -47,9 +47,6 @@ async function main() {
|
|||
.filter(Boolean)
|
||||
logger.info(`found ${db_programs.length} programs`)
|
||||
|
||||
logger.info(`creating ${logPath}...`)
|
||||
await file.create(logPath)
|
||||
|
||||
await generateByCountry()
|
||||
|
||||
await generateBySource()
|
||||
|
@ -231,9 +228,10 @@ function calcScore(program) {
|
|||
async function makeReport() {
|
||||
const errors = []
|
||||
|
||||
let countryGuides = guides.filter(g => g.groupedBy === 'country')
|
||||
let programs = _.uniqBy(db_programs, p => p.site + p.channel)
|
||||
for (let program of programs) {
|
||||
if (!guides.find(g => g.channel === program.channel)) {
|
||||
if (!countryGuides.find(g => g.channel === program.channel)) {
|
||||
const channel = await api.channels.find({ id: program.channel })
|
||||
errors.push({ type: 'no_guide', ...program, ...channel })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue