mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 13:03:25 +00:00
Update search.ts
This commit is contained in:
@@ -29,11 +29,15 @@ export async function getFlixhqId(ctx: ScrapeContext, media: MovieMedia | ShowMe
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const matchingItem = items.find(
|
const matchingItem = items.find(v => {
|
||||||
(v) => v &&
|
if (!v) return false;
|
||||||
(media.type === 'movie' ? compareMedia(media, v.title, v.year) :
|
|
||||||
compareTitle(media.title, v.title) && media.season.number < v.seasons + 1)
|
if (media.type === 'movie') {
|
||||||
);
|
return compareMedia(media, v.title, v.year)
|
||||||
|
}
|
||||||
|
|
||||||
|
return compareTitle(media.title, v.title) && media.season.number < v.seasons + 1
|
||||||
|
});
|
||||||
|
|
||||||
if (!matchingItem) return null;
|
if (!matchingItem) return null;
|
||||||
return matchingItem.id;
|
return matchingItem.id;
|
||||||
|
Reference in New Issue
Block a user