mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-13 10:30:03 -04:00
Update generate.js
This commit is contained in:
parent
4ffdc5c880
commit
f264e09342
1 changed files with 15 additions and 15 deletions
|
@ -64,21 +64,6 @@ function main() {
|
||||||
|
|
||||||
let channel = util.createChannel(item)
|
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()
|
let category = channel.group.toLowerCase()
|
||||||
if(categoryBuffer[category]) {
|
if(categoryBuffer[category]) {
|
||||||
categoryBuffer[category].push(channel)
|
categoryBuffer[category].push(channel)
|
||||||
|
@ -97,6 +82,21 @@ function main() {
|
||||||
languageBuffer['undefined'].push(channel)
|
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++
|
stats.channels++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue