diff --git a/package.json b/package.json index 50e8c39..8658a05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@movie-web/providers", - "version": "1.1.2", + "version": "1.1.3", "description": "Package that contains all the providers of movie-web", "main": "./lib/index.umd.js", "types": "./lib/index.d.ts", diff --git a/src/providers/embeds/upcloud.ts b/src/providers/embeds/upcloud.ts index 96cd14c..d31cf72 100644 --- a/src/providers/embeds/upcloud.ts +++ b/src/providers/embeds/upcloud.ts @@ -74,7 +74,12 @@ export const upcloudScraper = makeEmbed({ let sources: { file: string; type: string } | null = null; if (!isJSON(streamRes.sources)) { - const scriptJs = await ctx.proxiedFetcher(`https://rabbitstream.net/js/player/prod/e4-player.min.js`); + const scriptJs = await ctx.proxiedFetcher(`https://rabbitstream.net/js/player/prod/e4-player.min.js`, { + query: { + // browser side caching on this endpoint is quite extreme. Add version query paramter to circumvent any caching + v: Date.now().toString(), + }, + }); const decryptionKey = extractKey(scriptJs); if (!decryptionKey) throw new Error('Key extraction failed'); diff --git a/src/providers/sources/flixhq/index.ts b/src/providers/sources/flixhq/index.ts index e5cae5b..90fe251 100644 --- a/src/providers/sources/flixhq/index.ts +++ b/src/providers/sources/flixhq/index.ts @@ -5,7 +5,6 @@ import { getFlixhqMovieSources, getFlixhqShowSources, getFlixhqSourceDetails } f import { getFlixhqId } from '@/providers/sources/flixhq/search'; import { NotFoundError } from '@/utils/errors'; -// TODO tv shows are available in flixHQ, just no scraper yet export const flixhqScraper = makeSourcerer({ id: 'flixhq', name: 'FlixHQ', diff --git a/src/providers/sources/superstream/index.ts b/src/providers/sources/superstream/index.ts index 8e78167..173f849 100644 --- a/src/providers/sources/superstream/index.ts +++ b/src/providers/sources/superstream/index.ts @@ -43,6 +43,7 @@ export const superStreamScraper = makeSourcerer({ }; const { qualities, fid } = await getStreamQualities(ctx, apiQuery); + if (fid === undefined) throw new NotFoundError('No streamable file found'); return { embeds: [], @@ -90,6 +91,7 @@ export const superStreamScraper = makeSourcerer({ }; const { qualities, fid } = await getStreamQualities(ctx, apiQuery); + if (fid === undefined) throw new NotFoundError('No streamable file found'); return { embeds: [], diff --git a/src/providers/sources/superstream/subtitles.ts b/src/providers/sources/superstream/subtitles.ts index 6516dfc..08fba3f 100644 --- a/src/providers/sources/superstream/subtitles.ts +++ b/src/providers/sources/superstream/subtitles.ts @@ -31,10 +31,10 @@ export async function getSubtitles( tid: type !== 'movie' ? id : undefined, episode: episodeId?.toString(), season: seasonId?.toString(), - group: episodeId ? '' : undefined, }; - const subtitleList = ((await sendRequest(ctx, subtitleApiQuery)) as CaptionApiResponse).data.list; + const subResult = (await sendRequest(ctx, subtitleApiQuery)) as CaptionApiResponse; + const subtitleList = subResult.data.list; const output: Caption[] = []; subtitleList.forEach((sub) => {