mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update create.js
This commit is contained in:
parent
6a89e53a1d
commit
0de4ee66d1
1 changed files with 47 additions and 43 deletions
|
@ -37,6 +37,7 @@ async function createQueue() {
|
||||||
const utcDate = date.getUTC()
|
const utcDate = date.getUTC()
|
||||||
const dates = Array.from({ length: options.days }, (_, i) => utcDate.add(i, 'd'))
|
const dates = Array.from({ length: options.days }, (_, i) => utcDate.add(i, 'd'))
|
||||||
for (const filepath of files) {
|
for (const filepath of files) {
|
||||||
|
try {
|
||||||
const dir = file.dirname(filepath)
|
const dir = file.dirname(filepath)
|
||||||
const { site, channels: items } = await parser.parseChannels(filepath)
|
const { site, channels: items } = await parser.parseChannels(filepath)
|
||||||
if (!site) continue
|
if (!site) continue
|
||||||
|
@ -85,6 +86,9 @@ async function createQueue() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
queue = Object.values(queue)
|
queue = Object.values(queue)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue