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
83a531c447
commit
f25bfe9f8c
1 changed files with 7 additions and 6 deletions
|
@ -12,10 +12,10 @@ const options = program
|
||||||
async function main() {
|
async function main() {
|
||||||
const items = []
|
const items = []
|
||||||
|
|
||||||
try {
|
await api.countries.load().catch(console.error)
|
||||||
await api.countries.load()
|
const files = await file.list(CHANNELS_PATH).catch(console.error)
|
||||||
const files = await file.list(CHANNELS_PATH)
|
for (const filepath of files) {
|
||||||
for (const filepath of files) {
|
try {
|
||||||
const { site, channels } = await parser.parseChannels(filepath)
|
const { site, channels } = await parser.parseChannels(filepath)
|
||||||
const dir = file.dirname(filepath)
|
const dir = file.dirname(filepath)
|
||||||
const config = require(file.resolve(`${dir}/${site}.config.js`))
|
const config = require(file.resolve(`${dir}/${site}.config.js`))
|
||||||
|
@ -31,9 +31,10 @@ async function main() {
|
||||||
count: channels.length,
|
count: channels.length,
|
||||||
group: `${suffix}/${site}`
|
group: `${suffix}/${site}`
|
||||||
})
|
})
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
} catch (err) {
|
|
||||||
console.error(err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await generateCountriesTable(items)
|
await generateCountriesTable(items)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue