mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update update.js
This commit is contained in:
parent
158c6542f5
commit
8649ff8b7c
1 changed files with 6 additions and 5 deletions
|
@ -8,9 +8,9 @@ const OUTPUT_DIR = process.env.OUTPUT_DIR || '.api'
|
||||||
async function main() {
|
async function main() {
|
||||||
let guides = []
|
let guides = []
|
||||||
|
|
||||||
try {
|
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`))
|
||||||
|
@ -27,9 +27,10 @@ async function main() {
|
||||||
url: `https://iptv-org.github.io/epg/guides/${suffix}/${site}.epg.xml`
|
url: `https://iptv-org.github.io/epg/guides/${suffix}/${site}.epg.xml`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
guides = _.sortBy(guides, 'channel')
|
guides = _.sortBy(guides, 'channel')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue