mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update create-matrix.js
This commit is contained in:
parent
a3a0bf0854
commit
781e093d46
1 changed files with 7 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
const { Command } = require('commander')
|
||||
const file = require('./file')
|
||||
const parser = require('./parser')
|
||||
const grabber = require('epg-grabber')
|
||||
|
||||
const program = new Command()
|
||||
program
|
||||
|
@ -16,13 +16,13 @@ file.list('sites/*.channels.xml', options.include, options.exclude).then(files =
|
|||
}
|
||||
|
||||
files.forEach(filename => {
|
||||
const country = filename.match(/sites\/.*_(.*)\.channels\.xml/i)[1]
|
||||
|
||||
const channelsFile = file.read(filename)
|
||||
const parsed = parser.parseChannels(channelsFile)
|
||||
parsed.groups.forEach(group => {
|
||||
matrix.guide.push({
|
||||
site: parsed.site,
|
||||
country: group.country.toLowerCase()
|
||||
})
|
||||
const parsed = grabber.parseChannels(channelsFile)
|
||||
matrix.guide.push({
|
||||
site: parsed.site,
|
||||
country
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue