chore(extractor): use MEDIAFLOW_DEFAULT_INIT where it was forgotten

This commit is contained in:
WebStreamr 2025-10-07 12:12:01 +00:00
parent a7360b68f0
commit bab0da2a8f
No known key found for this signature in database
3 changed files with 21 additions and 6 deletions

View file

@ -1,7 +1,12 @@
import * as cheerio from 'cheerio';
import { NotFoundError } from '../error';
import { Context, Format, Meta, UrlResult } from '../types';
import { buildMediaFlowProxyExtractorStreamUrl, guessHeightFromPlaylist, supportsMediaFlowProxy } from '../utils';
import {
buildMediaFlowProxyExtractorStreamUrl,
guessHeightFromPlaylist,
MEDIAFLOW_DEFAULT_INIT,
supportsMediaFlowProxy,
} from '../utils';
import { Extractor } from './Extractor';
/** @see https://github.com/Gujal00/ResolveURL/blob/master/script.module.resolveurl/lib/resolveurl/plugins/filemoon.py */
@ -64,7 +69,7 @@ export class FileMoon extends Extractor {
ttl: this.ttl,
meta: {
...meta,
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, { queueLimit: 4 }),
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, MEDIAFLOW_DEFAULT_INIT),
title,
},
},

View file

@ -2,7 +2,12 @@ import bytes from 'bytes';
import * as cheerio from 'cheerio';
import { NotFoundError } from '../error';
import { Context, Format, Meta, UrlResult } from '../types';
import { buildMediaFlowProxyExtractorStreamUrl, guessHeightFromPlaylist, supportsMediaFlowProxy } from '../utils';
import {
buildMediaFlowProxyExtractorStreamUrl,
guessHeightFromPlaylist,
MEDIAFLOW_DEFAULT_INIT,
supportsMediaFlowProxy,
} from '../utils';
import { Extractor } from './Extractor';
/** @see https://github.com/Gujal00/ResolveURL/blob/master/script.module.resolveurl/lib/resolveurl/plugins/lulustream.py */
@ -56,7 +61,7 @@ export class LuluStream extends Extractor {
meta: {
...meta,
bytes: bytes.parse(sizeMatch[1] as string) as number,
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, { queueLimit: 4 }),
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, MEDIAFLOW_DEFAULT_INIT),
title,
},
},

View file

@ -1,7 +1,12 @@
import * as cheerio from 'cheerio';
import { NotFoundError } from '../error';
import { Context, Format, Meta, UrlResult } from '../types';
import { buildMediaFlowProxyExtractorStreamUrl, guessHeightFromPlaylist, supportsMediaFlowProxy } from '../utils';
import {
buildMediaFlowProxyExtractorStreamUrl,
guessHeightFromPlaylist,
MEDIAFLOW_DEFAULT_INIT,
supportsMediaFlowProxy,
} from '../utils';
import { Extractor } from './Extractor';
/** @see https://github.com/Gujal00/ResolveURL/blob/master/script.module.resolveurl/lib/resolveurl/plugins/voesx.py */
@ -142,7 +147,7 @@ export class Voe extends Extractor {
ttl: this.ttl,
meta: {
...meta,
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, { queueLimit: 4 }),
height: await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl, MEDIAFLOW_DEFAULT_INIT),
title,
},
},