mirror of
https://github.com/sussy-code/providers.git
synced 2026-03-11 17:55:37 +00:00
Fix nepu shows
This commit is contained in:
parent
8dd3fcc1de
commit
1b1940b390
2 changed files with 2 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@ export type SearchResults = {
|
|||
id: number;
|
||||
name: string;
|
||||
url: string;
|
||||
type: 'Movie' | 'Serie';
|
||||
type: 'Movie' | 'Show';
|
||||
}[];
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue