Update create-matrix.js

This commit is contained in:
Aleksandr Statciuk 2021-10-15 04:34:41 +03:00
parent 4b7529e298
commit 563d1c1b76

View file

@ -10,13 +10,13 @@ program
const options = program.opts()
file.list('sites/*.channels.xml', options.include, options.exclude).then(files => {
file.list('sites/**/*.channels.xml', options.include, options.exclude).then(files => {
const matrix = {
guide: []
}
files.forEach(filename => {
const country = filename.match(/sites\/.*_(.*)\.channels\.xml/i)[1]
const country = filename.match(/sites\/.*\/.*_(.*)\.channels\.xml/i)[1]
const channelsFile = file.read(filename)
const parsed = grabber.parseChannels(channelsFile)