From 301c9200ad2c92aec44f2ba27f41094f15ba15e5 Mon Sep 17 00:00:00 2001 From: TPN Date: Fri, 5 Apr 2024 17:41:43 +0000 Subject: [PATCH 1/4] fix ridomovies search --- src/providers/sources/ridomovies/index.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/providers/sources/ridomovies/index.ts b/src/providers/sources/ridomovies/index.ts index 1fa7659..69fb745 100644 --- a/src/providers/sources/ridomovies/index.ts +++ b/src/providers/sources/ridomovies/index.ts @@ -19,13 +19,19 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) => q: ctx.media.title, }, }); - const show = searchResult.data.items[0]; - if (!show) throw new NotFoundError('No watchable item found'); + const mediaData = searchResult.data.items.map((movieEl) => { + const name = movieEl.title; + const year = movieEl.contentable.releaseYear; + const fullSlug = movieEl.fullSlug; + return { name, year, fullSlug }; + }); + const targetMedia = mediaData.find((m) => m.name === ctx.media.title); + if (!targetMedia?.fullSlug) throw new NotFoundError('No watchable item found'); - let iframeSourceUrl = `/${show.fullSlug}/videos`; + let iframeSourceUrl = `/${targetMedia.fullSlug}/videos`; if (ctx.media.type === 'show') { - const showPageResult = await ctx.proxiedFetcher(`/${show.fullSlug}`, { + const showPageResult = await ctx.proxiedFetcher(`/${targetMedia.fullSlug}`, { baseUrl: ridoMoviesBase, }); const fullEpisodeSlug = `season-${ctx.media.season.number}/episode-${ctx.media.episode.number}`; From a6667ade8cac7e26a29d4287edf82a559ec9f92b Mon Sep 17 00:00:00 2001 From: Jorrin Date: Fri, 5 Apr 2024 19:52:43 +0200 Subject: [PATCH 2/4] remove unused flag --- src/providers/embeds/filemoon/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/providers/embeds/filemoon/index.ts b/src/providers/embeds/filemoon/index.ts index e63e2be..fb6ee08 100644 --- a/src/providers/embeds/filemoon/index.ts +++ b/src/providers/embeds/filemoon/index.ts @@ -1,8 +1,6 @@ import { load } from 'cheerio'; import { unpack } from 'unpacker'; -import { flags } from '@/entrypoint/utils/targets'; - import { SubtitleResult } from './types'; import { makeEmbed } from '../../base'; import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '../../captions'; From 718eb97c06dbeaf5ef0c900d0c6cbb3e3f48e76f Mon Sep 17 00:00:00 2001 From: TPN Date: Fri, 5 Apr 2024 23:28:49 +0530 Subject: [PATCH 3/4] check year --- src/providers/sources/ridomovies/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/sources/ridomovies/index.ts b/src/providers/sources/ridomovies/index.ts index 69fb745..638ea13 100644 --- a/src/providers/sources/ridomovies/index.ts +++ b/src/providers/sources/ridomovies/index.ts @@ -25,7 +25,7 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) => const fullSlug = movieEl.fullSlug; return { name, year, fullSlug }; }); - const targetMedia = mediaData.find((m) => m.name === ctx.media.title); + const targetMedia = mediaData.find((m) => m.name === ctx.media.title && m.year === ctx.media.releaseYear.toString()); if (!targetMedia?.fullSlug) throw new NotFoundError('No watchable item found'); let iframeSourceUrl = `/${targetMedia.fullSlug}/videos`; From 29d0ea4276f3402ffb9c27121a3e57f5068d1686 Mon Sep 17 00:00:00 2001 From: Jorrin Date: Fri, 5 Apr 2024 20:01:45 +0200 Subject: [PATCH 4/4] add ridomovies search to changelog --- .docs/content/1.get-started/4.changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.docs/content/1.get-started/4.changelog.md b/.docs/content/1.get-started/4.changelog.md index 82b33fa..0836b31 100644 --- a/.docs/content/1.get-started/4.changelog.md +++ b/.docs/content/1.get-started/4.changelog.md @@ -6,6 +6,7 @@ title: 'Changelog' - Fixed VidSrcTo (both Vidplay and Filemoon embeds) - Added dropload, filelions and vtube embeds to Primewire - Fixed and enabled Smashystream +- Improved RidoMovies search results # Version 2.2.8 - Fix package exports for CJS and ESM