From 8626f1f2d9aafa997a15d8834608504a68cc648d Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sun, 6 Jun 2021 13:15:10 +0300 Subject: [PATCH 1/2] Update db.js --- scripts/db.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/db.js b/scripts/db.js index 75cf792ff..58ee0dacb 100644 --- a/scripts/db.js +++ b/scripts/db.js @@ -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 }, From d63e68760dee3c785732c8b2bd14456069d128be Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sun, 6 Jun 2021 13:15:19 +0300 Subject: [PATCH 2/2] Update update-readme.js --- scripts/update-readme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update-readme.js b/scripts/update-readme.js index c1a3faa4e..3f20e0a73 100644 --- a/scripts/update-readme.js +++ b/scripts/update-readme.js @@ -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: `https://iptv-org.github.io/iptv/countries/${country.code}.m3u` }) } @@ -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: `https://iptv-org.github.io/iptv/languages/${language.code}.m3u` }) }