Fix nepu shows

This commit is contained in:
TPN 2025-01-22 14:29:15 +00:00
parent 8dd3fcc1de
commit 1b1940b390
2 changed files with 2 additions and 2 deletions

View file

@ -24,7 +24,7 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) =>
const show = searchResult.data.find((item) => {
if (!item) return false;
if (ctx.media.type === 'movie' && item.type !== 'Movie') return false;
if (ctx.media.type === 'show' && item.type !== 'Serie') return false;
if (ctx.media.type === 'show' && item.type !== 'Show') return false;
const [, title, year] = item.name.match(/^(.*?)\s*(?:\(?\s*(\d{4})(?:\s*-\s*\d{0,4})?\s*\)?)?\s*$/) || [];
return compareMedia(ctx.media, title, Number(year));

View file

@ -3,6 +3,6 @@ export type SearchResults = {
id: number;
name: string;
url: string;
type: 'Movie' | 'Serie';
type: 'Movie' | 'Show';
}[];
};