Fixed error in calculation of the number of channels
This commit is contained in:
parent
83d7c52b17
commit
8f1208a8de
|
@ -34,19 +34,19 @@ function parseIndex() {
|
||||||
|
|
||||||
for(let item of playlist.items) {
|
for(let item of playlist.items) {
|
||||||
|
|
||||||
// country
|
// countries
|
||||||
if(countries[countryCode]) {
|
if(countries[countryCode]) {
|
||||||
countries[countryCode].channels++
|
countries[countryCode].channels++
|
||||||
} else {
|
} else {
|
||||||
countries[countryCode] = {
|
countries[countryCode] = {
|
||||||
country: countryName,
|
country: countryName,
|
||||||
channels: playlist.items.length,
|
channels: 1,
|
||||||
playlist: `<code>https://iptv-org.github.io/iptv/countries/${countryCode}.m3u</code>`,
|
playlist: `<code>https://iptv-org.github.io/iptv/countries/${countryCode}.m3u</code>`,
|
||||||
epg: countryEpg
|
epg: countryEpg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// language
|
// languages
|
||||||
const languageName = item.tvg.language || 'Undefined'
|
const languageName = item.tvg.language || 'Undefined'
|
||||||
const languageCode = helper.getISO6391Code(languageName) || 'undefined'
|
const languageCode = helper.getISO6391Code(languageName) || 'undefined'
|
||||||
if(languages[languageCode]) {
|
if(languages[languageCode]) {
|
||||||
|
@ -59,7 +59,7 @@ function parseIndex() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// category
|
// categories
|
||||||
const categoryName = item.group.title || 'Other'
|
const categoryName = item.group.title || 'Other'
|
||||||
const categoryCode = categoryName.toLowerCase()
|
const categoryCode = categoryName.toLowerCase()
|
||||||
if(categories[categoryCode]) {
|
if(categories[categoryCode]) {
|
||||||
|
|
Loading…
Reference in New Issue