Add scanlator filter to chapter list

closes #937
This commit is contained in:
schroda
2025-06-09 15:32:04 +02:00
parent 645eaeb315
commit 7c0ffe9bd3
13 changed files with 234 additions and 10 deletions

View File

@@ -439,4 +439,12 @@ export class Chapters {
return Math.max(0, Math.floor(higherChapterNumber) - Math.floor(lowerChapterNumber) - 1);
}
static getScanlators<Chapter extends ChapterScanlatorInfo>(chapters: Chapter[]): string[] {
return [
...new Set(
chapters.map((chapter) => chapter.scanlator).filter((scanlator) => typeof scanlator === 'string'),
),
];
}
}