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:
L4XB
2026-10-25 04:09:46 +01:00
parent f759c62f2e
commit 215ee48311
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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