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 -3
View File
@@ -4,7 +4,7 @@
import { gql, thumbUrl } from "../../lib/client";
import { GET_SOURCES, FETCH_SOURCE_MANGA, UPDATE_MANGA, GET_CATEGORIES, CREATE_CATEGORY, UPDATE_MANGA_CATEGORIES } from "../../lib/queries";
import { cache, CACHE_KEYS } from "../../lib/cache";
import { dedupeSources, dedupeMangaByTitle, dedupeMangaById } from "../../lib/util";
import { dedupeSources, dedupeMangaByTitle, dedupeMangaById, isNsfwManga } from "../../lib/util";
import { store, setPreviewManga, clearDiscoverCache } from "../../store/state.svelte";
import type { Manga, Source, Category } from "../../lib/types";
import ContextMenu from "../shared/ContextMenu.svelte";
@@ -60,7 +60,11 @@
}
function filterOut(mangas: Manga[]): Manga[] {
return dedup(mangas.filter(m => !m.inLibrary && !store.discoverLibraryIds.has(m.id)));
return dedup(mangas.filter(m => {
if (m.inLibrary || store.discoverLibraryIds.has(m.id)) return false;
if (!store.settings.showNsfw && isNsfwManga(m)) return false;
return true;
}));
}
function rotatedSources(): Source[] {
@@ -183,7 +187,9 @@
);
if (ctrl.signal.aborted) return;
const local = dedup(d.mangas.nodes);
const local = dedup(
d.mangas.nodes.filter(m => store.settings.showNsfw || !isNsfwManga(m))
);
store.discoverCache.set(localKey, local);
genreResults.set(genre, local.slice(0, GRID_LIMIT));
genreResults = new Map(genreResults);