From 894341c12b5615d77852ac3ee00d7727f9d31343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Moret?= Date: Wed, 31 Jan 2024 10:26:40 +0000 Subject: [PATCH 1/6] To test. --- .readme/supported-categories.md | 1 - .readme/template.md | 10 ++-------- scripts/commands/playlist/generate.ts | 2 -- scripts/commands/playlist/validate.ts | 10 ++++++++++ 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.readme/supported-categories.md b/.readme/supported-categories.md index b5f0f59c75..c01f5cf262 100644 --- a/.readme/supported-categories.md +++ b/.readme/supported-categories.md @@ -29,4 +29,3 @@ | Sports | Programming is sports | | Travel | Programming is travel related | | Weather | Programming is focused on weather | -| XXX | Programming is adult oriented and x-rated | diff --git a/.readme/template.md b/.readme/template.md index b0468eb3c3..da49331b9d 100644 --- a/.readme/template.md +++ b/.readme/template.md @@ -24,22 +24,16 @@ Simply insert one of the links below into [any video player](https://github.com/ ## Playlists -There are several versions of playlists that differ in the way they are grouped. +There are several versions of playlists that differ in the way they are grouped. As of January 30th, 2024, we have stopped distributing NSFW channels. For more information, please look at [this issue](https://github.com/iptv-org/iptv/issues/15723). ### Main playlist -Playlist includes all known channels except adult channels. +This playlist includes all known channels available in this repository. ``` https://iptv-org.github.io/iptv/index.m3u ``` -And here is the full version: - -``` -https://iptv-org.github.io/iptv/index.nsfw.m3u -``` - ### Grouped by category
diff --git a/scripts/commands/playlist/generate.ts b/scripts/commands/playlist/generate.ts index 49fe0c0cdd..aeb02769a2 100644 --- a/scripts/commands/playlist/generate.ts +++ b/scripts/commands/playlist/generate.ts @@ -65,8 +65,6 @@ async function main() { }).generate() logger.info('generating index.m3u...') await new IndexGenerator({ streams, logger: generatorsLogger }).generate() - logger.info('generating index.nsfw.m3u...') - await new IndexNsfwGenerator({ streams, logger: generatorsLogger }).generate() logger.info('generating index.category.m3u...') await new IndexCategoryGenerator({ streams, logger: generatorsLogger }).generate() logger.info('generating index.country.m3u...') diff --git a/scripts/commands/playlist/validate.ts b/scripts/commands/playlist/validate.ts index b128058cf3..5a9426149e 100644 --- a/scripts/commands/playlist/validate.ts +++ b/scripts/commands/playlist/validate.ts @@ -82,6 +82,16 @@ async function main() { message: `"${stream.name}" is on the blocklist due to claims of copyright holders (${blocked.ref})` }) } + + const chNSFW = stream.channel && !channels.first((channel: Channel) => channel.categories === "XXX") + if(chNSFW) { + log.add({ + type: 'error', + line: stream.line, + message: `Since January 30th, 2024, NSFW channels are no longer allowed in our playlists. Please see https://github.com/iptv-org/iptv/issues/15723 for further information.` + }) + } + }) if (log.notEmpty()) { From 5c010f2943e8e47a2f275b9c540eb5b45f6bf37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Moret?= Date: Wed, 31 Jan 2024 10:28:13 +0000 Subject: [PATCH 2/6] Verify channel ID. --- scripts/commands/playlist/validate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/commands/playlist/validate.ts b/scripts/commands/playlist/validate.ts index 5a9426149e..cf017e4801 100644 --- a/scripts/commands/playlist/validate.ts +++ b/scripts/commands/playlist/validate.ts @@ -83,7 +83,7 @@ async function main() { }) } - const chNSFW = stream.channel && !channels.first((channel: Channel) => channel.categories === "XXX") + const chNSFW = stream.channel && !channels.first((channel: Channel) => (channel.id === stream.channel) && (channel.categories === "XXX")) if(chNSFW) { log.add({ type: 'error', From 64f5901991940f7de4a97e470e2a630560e7f98f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Moret?= Date: Thu, 1 Feb 2024 16:36:07 +0000 Subject: [PATCH 3/6] whoopsie --- scripts/commands/playlist/validate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/commands/playlist/validate.ts b/scripts/commands/playlist/validate.ts index cf017e4801..5411c3d945 100644 --- a/scripts/commands/playlist/validate.ts +++ b/scripts/commands/playlist/validate.ts @@ -83,7 +83,7 @@ async function main() { }) } - const chNSFW = stream.channel && !channels.first((channel: Channel) => (channel.id === stream.channel) && (channel.categories === "XXX")) + const chNSFW = stream.channel && !channels.first((channel: Channel) => (channel.id === stream.channel) && (stream.categories === "XXX")) if(chNSFW) { log.add({ type: 'error', From 848dd5d571b0e71c4975d257b627e4b5780c37f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Moret?= Date: Thu, 1 Feb 2024 18:33:09 +0000 Subject: [PATCH 4/6] correct --- scripts/commands/playlist/validate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/commands/playlist/validate.ts b/scripts/commands/playlist/validate.ts index 5411c3d945..2ae199b67f 100644 --- a/scripts/commands/playlist/validate.ts +++ b/scripts/commands/playlist/validate.ts @@ -83,7 +83,7 @@ async function main() { }) } - const chNSFW = stream.channel && !channels.first((channel: Channel) => (channel.id === stream.channel) && (stream.categories === "XXX")) + const chNSFW = stream.channel && !channels.first((channel: Channel) => (channel.id === stream.channel) && (channel.isNSFW === true)) if(chNSFW) { log.add({ type: 'error', From dec958eb847d36b4a68ce41161859ab58aa5d107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Moret?= Date: Thu, 1 Feb 2024 18:35:29 +0000 Subject: [PATCH 5/6] not quite sure... --- scripts/commands/playlist/validate.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/commands/playlist/validate.ts b/scripts/commands/playlist/validate.ts index 2ae199b67f..56eb2b72f6 100644 --- a/scripts/commands/playlist/validate.ts +++ b/scripts/commands/playlist/validate.ts @@ -83,8 +83,7 @@ async function main() { }) } - const chNSFW = stream.channel && !channels.first((channel: Channel) => (channel.id === stream.channel) && (channel.isNSFW === true)) - if(chNSFW) { + if(stream.isNSFW === true) { log.add({ type: 'error', line: stream.line, From bd1647174bdb733cf99ab46b315ac7a114b040df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Moret?= Date: Thu, 1 Feb 2024 18:38:10 +0000 Subject: [PATCH 6/6] should do the trick. --- scripts/commands/playlist/validate.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/commands/playlist/validate.ts b/scripts/commands/playlist/validate.ts index 56eb2b72f6..427da95b3c 100644 --- a/scripts/commands/playlist/validate.ts +++ b/scripts/commands/playlist/validate.ts @@ -83,7 +83,8 @@ async function main() { }) } - if(stream.isNSFW === true) { + const channel_NSFW = stream.channel && channels.first((channel: Channel) => (channel.id === stream.channel) && (channel.isNSFW === true)) + if(channel_NSFW) { log.add({ type: 'error', line: stream.line,