Fix: SeriesDetail passing Incorrect Args to Reader

This commit is contained in:
Youwes09
2026-03-29 14:03:28 -05:00
parent 262027d9f9
commit f6786def87
5 changed files with 78 additions and 20 deletions
+9 -4
View File
@@ -4,7 +4,7 @@
import { gql, thumbUrl } from "../../lib/client";
import { GET_CATEGORIES, GET_LIBRARY, UPDATE_MANGA, GET_CHAPTERS, DELETE_DOWNLOADED_CHAPTERS, DEQUEUE_DOWNLOAD, CREATE_CATEGORY, UPDATE_MANGA_CATEGORIES, UPDATE_CATEGORY_ORDER } from "../../lib/queries";
import { cache, CACHE_KEYS, CACHE_GROUPS, DEFAULT_TTL_MS } from "../../lib/cache";
import { dedupeMangaById, dedupeMangaByTitle } from "../../lib/util";
import { dedupeMangaById, dedupeMangaByTitle, isNsfwManga } from "../../lib/util";
import { store, setLibraryFilter, checkAndMarkCompleted as storeCheckAndMarkCompleted, updateSettings, setCategories } from "../../store/state.svelte";
import type { LibrarySortMode, LibrarySortDir, LibraryStatusFilter } from "../../store/state.svelte";
import type { Manga, Category, Chapter } from "../../lib/types";
@@ -319,10 +319,15 @@
items = categoryMangaMap.get(Number(store.libraryFilter)) ?? [];
}
// 2. Text search
// 2. NSFW filter — always applied before text search or sort
if (!store.settings.showNsfw) {
items = items.filter(m => !isNsfwManga(m));
}
// 3. Text search
if (q) items = items.filter(m => m.title.toLowerCase().includes(q));
// 3. Status filter
// 4. Status filter
if (status !== "ALL") {
items = items.filter(m => {
const s = m.status?.toUpperCase().replace(/\s+/g, "_") ?? "UNKNOWN";
@@ -330,7 +335,7 @@
});
}
// 4. Sort
// 5. Sort
const recentlyReadMap = new Map<number, number>();
if (mode === "recentlyRead") {
for (const h of store.history) {