chore: use concurrency of 4 for mediaflow proxy requests

by default mediaflow also runs with 4 workers, this should avoid
pressure
This commit is contained in:
WebStreamr 2025-09-30 19:27:57 +00:00
parent 9f46b7fffa
commit 04b8987c30
No known key found for this signature in database
5 changed files with 6 additions and 6 deletions

View file

@ -80,7 +80,7 @@ export class FileLions extends Extractor {
ttl: this.ttl,
meta: {
...meta,
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, { headers: { Referer: url.href } }),
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, { headers: { Referer: url.href }, queueLimit: 4 }),
...(sizeMatch && {
bytes: bytes.parse(sizeMatch[1] as string) as number,
}),

View file

@ -40,7 +40,7 @@ export class Streamtape extends Extractor {
meta: {
...meta,
title,
bytes: await guessSizeFromMp4(ctx, this.fetcher, mp4Url),
bytes: await guessSizeFromMp4(ctx, this.fetcher, mp4Url, { queueLimit: 4 }),
},
},
];

View file

@ -46,7 +46,7 @@ export class Uqload extends Extractor {
meta: {
...meta,
title,
bytes: await guessSizeFromMp4(ctx, this.fetcher, mp4Url, { headers: { Referer: url.href } }),
bytes: await guessSizeFromMp4(ctx, this.fetcher, mp4Url, { headers: { Referer: url.href }, queueLimit: 4 }),
...(heightMatch && {
height: parseInt(heightMatch[1] as string),
}),

View file

@ -20,7 +20,7 @@ export class VixSrc extends Extractor {
protected async extractInternal(ctx: Context, url: URL, meta: Meta): Promise<UrlResult[]> {
const playlistUrl = await buildMediaFlowProxyExtractorStreamUrl(ctx, this.fetcher, 'VixCloud', url);
const countryCodes = await this.determineCountryCodesFromPlaylist(ctx, playlistUrl, { headers: { Referer: url.href } });
const countryCodes = await this.determineCountryCodesFromPlaylist(ctx, playlistUrl, { headers: { Referer: url.href }, queueLimit: 4 });
if (!hasMultiEnabled(ctx.config) && !countryCodes.some(countryCode => countryCode in ctx.config)) {
return [];
@ -35,7 +35,7 @@ export class VixSrc extends Extractor {
ttl: this.ttl,
meta: {
countryCodes,
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, { headers: { Referer: url.href } }),
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, { headers: { Referer: url.href }, queueLimit: 4 }),
},
},
];

View file

@ -35,7 +35,7 @@ export const buildMediaFlowProxyExtractorRedirectUrl = (ctx: Context, host: stri
export const buildMediaFlowProxyExtractorStreamUrl = async (ctx: Context, fetcher: Fetcher, host: string, url: URL, headers: Record<string, string> = {}): Promise<URL> => {
const mediaFlowProxyUrl = buildMediaFlowProxyExtractorUrl(ctx, host, url, headers);
const extractResult: ExtractResult = await fetcher.json(ctx, mediaFlowProxyUrl);
const extractResult: ExtractResult = await fetcher.json(ctx, mediaFlowProxyUrl, { queueLimit: 4 });
const streamUrl = new URL(extractResult.mediaflow_proxy_url);