mirror of
https://github.com/iptv-org/iptv.git
synced 2026-11-03 15:12:57 +02:00
fix: leave NSFW channels out of the categories and sources playlists
The other public generators drop NSFW streams with isSFW(), as PLAYLISTS.md promises (no NSFW channels since January 30th, 2024), but categories/ and sources/ took every stream, so NSFW channels with a feed were published there. The test fixture's NSFW channel now carries its feed id, so it reaches the generators instead of being dropped as a stream without a feed.
This commit is contained in:
@@ -25,7 +25,7 @@ export class CategoriesGenerator implements Generator {
|
||||
}
|
||||
|
||||
async generate() {
|
||||
const streams = this.streams
|
||||
const streams = this.streams.filter((stream: Stream) => stream.isSFW())
|
||||
|
||||
this.categories.forEach(async (category: sdk.Models.Category) => {
|
||||
const categoryStreams = streams
|
||||
|
||||
@@ -21,9 +21,9 @@ export class SourcesGenerator implements Generator {
|
||||
}
|
||||
|
||||
async generate() {
|
||||
const files: Dictionary<Stream[]> = this.streams.groupBy((stream: Stream) =>
|
||||
stream.getFilename()
|
||||
)
|
||||
const files: Dictionary<Stream[]> = this.streams
|
||||
.filter((stream: Stream) => stream.isSFW())
|
||||
.groupBy((stream: Stream) => stream.getFilename())
|
||||
|
||||
for (const filename of files.keys()) {
|
||||
if (!filename) continue
|
||||
|
||||
Reference in New Issue
Block a user