Fix script caching on upcloud

This commit is contained in:
mrjvs 2023-12-02 01:08:31 +01:00
parent 2f02522ca6
commit 50c3166e70
2 changed files with 6 additions and 2 deletions

View File

@ -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');

View File

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