Manga results to filter
Original search title (for logging)
Search configuration
Filtered manga results
export function applyContentFiltering(
results: AniListManga[],
title: string,
searchConfig: SearchServiceConfig,
): AniListManga[] {
let filteredResults = results.filter(
(manga) => manga.format !== "NOVEL" && manga.format !== "LIGHT_NOVEL",
);
if (!searchConfig.bypassCache) {
const matchConfig = getMatchConfig();
filteredResults = applySystemContentFilters(
filteredResults,
matchConfig,
undefined,
title,
);
}
return filteredResults;
}
Filter out novels, one-shots, and adult content based on configuration.
Filtering only applies during automatic matching (bypassCache false).