commit
24122ce035
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@movie-web/providers",
|
"name": "@movie-web/providers",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"description": "Package that contains all the providers of movie-web",
|
"description": "Package that contains all the providers of movie-web",
|
||||||
"main": "./lib/index.umd.js",
|
"main": "./lib/index.umd.js",
|
||||||
"types": "./lib/index.d.ts",
|
"types": "./lib/index.d.ts",
|
||||||
|
|
|
@ -74,7 +74,12 @@ export const upcloudScraper = makeEmbed({
|
||||||
let sources: { file: string; type: string } | null = null;
|
let sources: { file: string; type: string } | null = null;
|
||||||
|
|
||||||
if (!isJSON(streamRes.sources)) {
|
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);
|
const decryptionKey = extractKey(scriptJs);
|
||||||
if (!decryptionKey) throw new Error('Key extraction failed');
|
if (!decryptionKey) throw new Error('Key extraction failed');
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import { getFlixhqMovieSources, getFlixhqShowSources, getFlixhqSourceDetails } f
|
||||||
import { getFlixhqId } from '@/providers/sources/flixhq/search';
|
import { getFlixhqId } from '@/providers/sources/flixhq/search';
|
||||||
import { NotFoundError } from '@/utils/errors';
|
import { NotFoundError } from '@/utils/errors';
|
||||||
|
|
||||||
// TODO tv shows are available in flixHQ, just no scraper yet
|
|
||||||
export const flixhqScraper = makeSourcerer({
|
export const flixhqScraper = makeSourcerer({
|
||||||
id: 'flixhq',
|
id: 'flixhq',
|
||||||
name: 'FlixHQ',
|
name: 'FlixHQ',
|
||||||
|
|
|
@ -43,6 +43,7 @@ export const superStreamScraper = makeSourcerer({
|
||||||
};
|
};
|
||||||
|
|
||||||
const { qualities, fid } = await getStreamQualities(ctx, apiQuery);
|
const { qualities, fid } = await getStreamQualities(ctx, apiQuery);
|
||||||
|
if (fid === undefined) throw new NotFoundError('No streamable file found');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
embeds: [],
|
embeds: [],
|
||||||
|
@ -90,6 +91,7 @@ export const superStreamScraper = makeSourcerer({
|
||||||
};
|
};
|
||||||
|
|
||||||
const { qualities, fid } = await getStreamQualities(ctx, apiQuery);
|
const { qualities, fid } = await getStreamQualities(ctx, apiQuery);
|
||||||
|
if (fid === undefined) throw new NotFoundError('No streamable file found');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
embeds: [],
|
embeds: [],
|
||||||
|
|
|
@ -31,10 +31,10 @@ export async function getSubtitles(
|
||||||
tid: type !== 'movie' ? id : undefined,
|
tid: type !== 'movie' ? id : undefined,
|
||||||
episode: episodeId?.toString(),
|
episode: episodeId?.toString(),
|
||||||
season: seasonId?.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[] = [];
|
const output: Caption[] = [];
|
||||||
|
|
||||||
subtitleList.forEach((sub) => {
|
subtitleList.forEach((sub) => {
|
||||||
|
|
Loading…
Reference in New Issue