Merge branch 'master' into LaneSh4d0w-patch-2

This commit is contained in:
Aleksandr Statciuk 2021-06-06 13:23:21 +03:00 committed by GitHub
commit ff92d914a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -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
},

View File

@ -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>`
})
}