Make soaperTv a non-extension source

This commit is contained in:
TPN 2024-06-16 19:25:34 +05:30
parent b8a48b0408
commit fac745b6a5
No known key found for this signature in database
GPG Key ID: 40AE091637892B91
1 changed files with 5 additions and 4 deletions

View File

@ -4,6 +4,7 @@ import { flags } from '@/entrypoint/utils/targets';
import { Caption, labelToLanguageCode } from '@/providers/captions'; import { Caption, labelToLanguageCode } from '@/providers/captions';
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context'; import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
import { NotFoundError } from '@/utils/errors'; import { NotFoundError } from '@/utils/errors';
import { convertPlaylistsToDataUrls } from '@/utils/playlist';
import { InfoResponse } from './types'; import { InfoResponse } from './types';
import { SourcererOutput, makeSourcerer } from '../../base'; import { SourcererOutput, makeSourcerer } from '../../base';
@ -90,18 +91,18 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext): Pr
stream: [ stream: [
{ {
id: 'primary', id: 'primary',
playlist: streamResJson.val, playlist: await convertPlaylistsToDataUrls(ctx.proxiedFetcher, streamResJson.val),
type: 'hls', type: 'hls',
flags: [flags.IP_LOCKED], flags: [flags.CORS_ALLOWED],
captions, captions,
}, },
...(streamResJson.val_bak ...(streamResJson.val_bak
? [ ? [
{ {
id: 'backup', id: 'backup',
playlist: streamResJson.val_bak, playlist: await convertPlaylistsToDataUrls(ctx.proxiedFetcher, streamResJson.val_bak),
type: 'hls' as const, type: 'hls' as const,
flags: [flags.IP_LOCKED], flags: [flags.CORS_ALLOWED],
captions, captions,
}, },
] ]