mirror of
https://git.luna-app.eu/50n50/sources
synced 2025-12-21 13:16:21 +01:00
Update videasy/videasy.js
This commit is contained in:
parent
6b85dee6c1
commit
928db9ec78
1 changed files with 20 additions and 6 deletions
|
|
@ -222,15 +222,22 @@ async function extractStreamUrl(ID) {
|
|||
|
||||
const nonHDRSources = sources.filter(s => !s.quality.includes("HDR"));
|
||||
|
||||
const streams = nonHDRSources.flatMap(src => [src.quality, src.url]);
|
||||
const streamObjects = nonHDRSources.map(src => ({
|
||||
title: src.quality,
|
||||
streamUrl: src.url,
|
||||
headers: {
|
||||
"Origin": "https://player.videasy.net",
|
||||
"Referer": "https://player.videasy.net/"
|
||||
}
|
||||
}));
|
||||
|
||||
const englishSubtitle = subtitles.find(
|
||||
sub => sub.language.toLowerCase().includes('english')
|
||||
)?.url || null;
|
||||
|
||||
return JSON.stringify({
|
||||
streams,
|
||||
subtitles: englishSubtitle
|
||||
streams: streamObjects,
|
||||
subtitle: englishSubtitle
|
||||
});
|
||||
} else if (ID.includes('tv')) {
|
||||
const parts = ID.split('/');
|
||||
|
|
@ -274,15 +281,22 @@ async function extractStreamUrl(ID) {
|
|||
|
||||
const nonHDRSources = sources.filter(s => !s.quality.includes("HDR"));
|
||||
|
||||
const streams = nonHDRSources.flatMap(src => [src.quality, src.url]);
|
||||
const streamObjects = nonHDRSources.map(src => ({
|
||||
title: src.quality,
|
||||
streamUrl: src.url,
|
||||
headers: {
|
||||
"Origin": "https://player.videasy.net",
|
||||
"Referer": "https://player.videasy.net/"
|
||||
}
|
||||
}));
|
||||
|
||||
const englishSubtitle = subtitles.find(
|
||||
sub => sub.language.toLowerCase().includes('english')
|
||||
)?.url || null;
|
||||
|
||||
return JSON.stringify({
|
||||
streams,
|
||||
subtitles: englishSubtitle
|
||||
streams: streamObjects,
|
||||
subtitle: englishSubtitle
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue