The manga to check
Whether this is a manual search operation
OptionalkenmeiManga: KenmeiMangaOptional Kenmei manga for custom rule evaluation
True if the manga should be skipped
export function shouldSkipManga(
manga: AniListManga,
isManualSearch: boolean,
kenmeiManga?: KenmeiManga,
): boolean {
// Skip Light Novels
if (manga.format === "NOVEL" || manga.format === "LIGHT_NOVEL") {
console.debug(
`[MangaSearchService] ⏭️ Skipping light novel: ${manga.title?.romaji || manga.title?.english || "unknown"}`,
);
return true;
}
if (isBlacklistedManga(manga)) {
console.debug(
`[MangaSearchService] ⏭️ Skipping blacklisted title: ${manga.title?.romaji || manga.title?.english || "unknown"}`,
);
return true;
}
// Check custom skip rules if kenmeiManga provided
if (
kenmeiManga &&
shouldSkipByCustomRules(manga, kenmeiManga, isManualSearch)
) {
console.debug(
`[MangaSearchService] ⏭️ Skipping due to custom rule: ${manga.title?.romaji || manga.title?.english || "unknown"}`,
);
return true;
}
return false;
}
Checks if a manga should be skipped during ranking. Skips light novels, automatic matching blacklist entries, and custom skip rules.