mirror of
https://github.com/p-stream/providers.git
synced 2026-04-21 17:52:18 +00:00
Update animetsu.ts
This commit is contained in:
parent
8917961a41
commit
440424c8dd
1 changed files with 2 additions and 16 deletions
|
|
@ -50,20 +50,6 @@ export function makeAnimetsuEmbed(id: string, rank: number = 100) {
|
||||||
const sourceType = source.type;
|
const sourceType = source.type;
|
||||||
const sourceQuality = source.quality;
|
const sourceQuality = source.quality;
|
||||||
|
|
||||||
let streamHeaders = { ...headers };
|
|
||||||
|
|
||||||
// change headers if the url has backend.animetsu.cc bc they tried to make it harder
|
|
||||||
if (streamUrl.includes('animetsu.cc')) {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
const { referer, origin, ...restHeaders } = streamHeaders;
|
|
||||||
|
|
||||||
streamHeaders = {
|
|
||||||
...restHeaders,
|
|
||||||
origin: 'https://backend.animetsu.cc',
|
|
||||||
referer: 'https://backend.animetsu.cc/',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.progress(100);
|
ctx.progress(100);
|
||||||
|
|
||||||
if (sourceType === 'mp4') {
|
if (sourceType === 'mp4') {
|
||||||
|
|
@ -87,7 +73,7 @@ export function makeAnimetsuEmbed(id: string, rank: number = 100) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
type: 'file',
|
type: 'file',
|
||||||
headers: streamHeaders,
|
headers,
|
||||||
flags: [],
|
flags: [],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
@ -100,7 +86,7 @@ export function makeAnimetsuEmbed(id: string, rank: number = 100) {
|
||||||
id: 'primary',
|
id: 'primary',
|
||||||
type: 'hls',
|
type: 'hls',
|
||||||
playlist: streamUrl,
|
playlist: streamUrl,
|
||||||
headers: streamHeaders,
|
headers,
|
||||||
flags: [],
|
flags: [],
|
||||||
captions: [],
|
captions: [],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue