mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 10:56:57 -05:00
Update update.js
This commit is contained in:
@@ -6,8 +6,10 @@ const CHANNELS_PATH = process.env.CHANNELS_PATH || 'sites/**/*.channels.xml'
|
||||
const OUTPUT_DIR = process.env.OUTPUT_DIR || '.gh-pages/api'
|
||||
|
||||
async function main() {
|
||||
const files = await file.list(CHANNELS_PATH)
|
||||
let guides = []
|
||||
|
||||
try {
|
||||
const files = await file.list(CHANNELS_PATH)
|
||||
for (const filepath of files) {
|
||||
const { site, channels } = await parser.parseChannels(filepath)
|
||||
const dir = file.dirname(filepath)
|
||||
@@ -26,6 +28,9 @@ async function main() {
|
||||
})
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
|
||||
guides = _.sortBy(guides, 'channel')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user