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.duplicates = true
|
||||||
this.filter = null
|
this.filter = null
|
||||||
|
|
||||||
@ -93,6 +98,11 @@ db.channels = {
|
|||||||
|
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
|
removeNSFW() {
|
||||||
|
this.nsfw = false
|
||||||
|
|
||||||
|
return this
|
||||||
|
},
|
||||||
all() {
|
all() {
|
||||||
return this.list
|
return this.list
|
||||||
},
|
},
|
||||||
|
@ -48,7 +48,7 @@ function generateCountriesTable() {
|
|||||||
const prefix = flag ? `${flag} ` : ''
|
const prefix = flag ? `${flag} ` : ''
|
||||||
countries.push({
|
countries.push({
|
||||||
country: prefix + country.name,
|
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>`
|
playlist: `<code>https://iptv-org.github.io/iptv/countries/${country.code}.m3u</code>`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ function generateLanguagesTable() {
|
|||||||
]) {
|
]) {
|
||||||
languages.push({
|
languages.push({
|
||||||
language: language.name,
|
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>`
|
playlist: `<code>https://iptv-org.github.io/iptv/languages/${language.code}.m3u</code>`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user