Merge pull request #3045 from iptv-org/fix-channel-counter
Fix channel counter
This commit is contained in:
commit
c889cd1574
|
@ -83,6 +83,11 @@ db.channels = {
|
|||
})
|
||||
}
|
||||
|
||||
if (!this.nsfw) {
|
||||
output = output.filter(channel => !channel.isNSFW())
|
||||
}
|
||||
|
||||
this.nsfw = true
|
||||
this.duplicates = true
|
||||
this.filter = null
|
||||
|
||||
|
@ -93,6 +98,11 @@ db.channels = {
|
|||
|
||||
return this
|
||||
},
|
||||
removeNSFW() {
|
||||
this.nsfw = false
|
||||
|
||||
return this
|
||||
},
|
||||
all() {
|
||||
return this.list
|
||||
},
|
||||
|
|
|
@ -48,7 +48,7 @@ function generateCountriesTable() {
|
|||
const prefix = flag ? `${flag} ` : ''
|
||||
countries.push({
|
||||
country: prefix + country.name,
|
||||
channels: db.channels.forCountry(country).removeDuplicates().count(),
|
||||
channels: db.channels.forCountry(country).removeDuplicates().removeNSFW().count(),
|
||||
playlist: `<code>https://iptv-org.github.io/iptv/countries/${country.code}.m3u</code>`
|
||||
})
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ function generateLanguagesTable() {
|
|||
]) {
|
||||
languages.push({
|
||||
language: language.name,
|
||||
channels: db.channels.forLanguage(language).removeDuplicates().count(),
|
||||
channels: db.channels.forLanguage(language).removeDuplicates().removeNSFW().count(),
|
||||
playlist: `<code>https://iptv-org.github.io/iptv/languages/${language.code}.m3u</code>`
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue