Merge pull request #34 from movie-web/dev

providers v1.1.3
This commit is contained in:
mrjvs 2023-12-04 21:44:01 +01:00 committed by GitHub
commit 24122ce035
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 5 deletions

View File

@ -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",

View File

@ -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<string>(`https://rabbitstream.net/js/player/prod/e4-player.min.js`);
const scriptJs = await ctx.proxiedFetcher<string>(`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');

View File

@ -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',

View File

@ -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: [],

View File

@ -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) => {