mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 18:13:25 +00:00
fix linting issues
This commit is contained in:
@@ -2,11 +2,11 @@ import { load } from 'cheerio';
|
|||||||
|
|
||||||
import { flags } from '@/entrypoint/utils/targets';
|
import { flags } from '@/entrypoint/utils/targets';
|
||||||
import { SourcererOutput, makeSourcerer } from '@/providers/base';
|
import { SourcererOutput, makeSourcerer } from '@/providers/base';
|
||||||
|
import { compareTitle } from '@/utils/compare';
|
||||||
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
|
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
|
||||||
import { NotFoundError } from '@/utils/errors';
|
import { NotFoundError } from '@/utils/errors';
|
||||||
|
|
||||||
import { SearchResults } from './types';
|
import { SearchResults } from './types';
|
||||||
import { compareTitle } from '@/utils/compare';
|
|
||||||
|
|
||||||
const nepuBase = 'https://nepu.to';
|
const nepuBase = 'https://nepu.to';
|
||||||
const nepuReferer = `${nepuBase}/`;
|
const nepuReferer = `${nepuBase}/`;
|
||||||
@@ -24,8 +24,8 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) =>
|
|||||||
|
|
||||||
const show = searchResult.data.find((item) => {
|
const show = searchResult.data.find((item) => {
|
||||||
if (!item) return false;
|
if (!item) return false;
|
||||||
if (ctx.media.type === 'movie' && item.type !== "Movie") 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 !== 'Serie') return false;
|
||||||
|
|
||||||
return compareTitle(ctx.media.title, item.name);
|
return compareTitle(ctx.media.title, item.name);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user