File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,17 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
51
51
) ;
52
52
if ( ! apiRes . data . file . sources . length ) throw new Error ( 'No sources found' ) ;
53
53
54
+ // this is to get around a ext bug where it doesn't send the headers to the second req after redir
55
+ const mediaBase = new URL ( ( await ctx . proxiedFetcher . full ( apiRes . data . file . sources [ 0 ] . src , { baseUrl } ) ) . finalUrl )
56
+ . origin ;
57
+
54
58
const qualities = apiRes . data . file . sources . reduce (
55
59
( acc , source ) => {
56
60
const quality = typeof source . quality === 'number' ? source . quality . toString ( ) : source . quality ;
57
61
const validQuality = getValidQualityFromString ( quality ) ;
58
62
acc [ validQuality ] = {
59
63
type : 'mp4' ,
60
- url : `${ baseUrl } ${ source . src } ` ,
64
+ url : `${ mediaBase } ${ source . src . replace ( '/api' , '' ) } ` ,
61
65
} ;
62
66
return acc ;
63
67
} ,
You can’t perform that action at this time.
0 commit comments