Update generate.js

This commit is contained in:
freearhey 2019-10-31 15:21:08 +03:00
parent 4ffdc5c880
commit f264e09342
1 changed files with 15 additions and 15 deletions

View File

@ -64,21 +64,6 @@ function main() {
let channel = util.createChannel(item)
let group = channel.group
for(const type of types) {
if(type === 'full') {
channel.group = [ c.name, channel.group ].filter(i => i).join(';')
} else if(type === 'country') {
channel.group = c.name
} else if(type === 'language') {
channel.group = channel.language
} else {
channel.group = group
}
util.appendToFile(`index.${type}.m3u`, channel.toString())
}
let category = channel.group.toLowerCase()
if(categoryBuffer[category]) {
categoryBuffer[category].push(channel)
@ -97,6 +82,21 @@ function main() {
languageBuffer['undefined'].push(channel)
}
let group = channel.group
for(const type of types) {
if(type === 'full') {
channel.group = [ c.name, channel.group ].filter(i => i).join(';')
} else if(type === 'country') {
channel.group = c.name
} else if(type === 'language') {
channel.group = channel.language
} else {
channel.group = group
}
util.appendToFile(`index.${type}.m3u`, channel.toString())
}
stats.channels++
}