Update index.js
This commit is contained in:
parent
ff4498e160
commit
cc26127089
|
@ -50,14 +50,12 @@ async function main() {
|
|||
programs.length
|
||||
} programs)`
|
||||
)
|
||||
if (options.debug) console.timeEnd(' time')
|
||||
|
||||
return programs.map(program => {
|
||||
program.lang = program.lang || item.channel.lang || undefined
|
||||
return program
|
||||
})
|
||||
})
|
||||
.then(utils.sleep(config.delay))
|
||||
.catch(err => {
|
||||
console.log(
|
||||
` ${config.site} - ${item.channel.xmltv_id} - ${item.date.format(
|
||||
|
@ -66,6 +64,10 @@ async function main() {
|
|||
)
|
||||
console.log(` Error: ${err.message}`)
|
||||
})
|
||||
.finally(() => {
|
||||
if (options.debug) console.timeEnd(' time')
|
||||
utils.sleep(config.delay)
|
||||
})
|
||||
|
||||
programs = programs.concat(progs)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue