mirror of
https://git.luna-app.eu/50n50/sources
synced 2025-12-21 21:26:19 +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 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(
|
const englishSubtitle = subtitles.find(
|
||||||
sub => sub.language.toLowerCase().includes('english')
|
sub => sub.language.toLowerCase().includes('english')
|
||||||
)?.url || null;
|
)?.url || null;
|
||||||
|
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
streams,
|
streams: streamObjects,
|
||||||
subtitles: englishSubtitle
|
subtitle: englishSubtitle
|
||||||
});
|
});
|
||||||
} else if (ID.includes('tv')) {
|
} else if (ID.includes('tv')) {
|
||||||
const parts = ID.split('/');
|
const parts = ID.split('/');
|
||||||
|
|
@ -274,15 +281,22 @@ async function extractStreamUrl(ID) {
|
||||||
|
|
||||||
const nonHDRSources = sources.filter(s => !s.quality.includes("HDR"));
|
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(
|
const englishSubtitle = subtitles.find(
|
||||||
sub => sub.language.toLowerCase().includes('english')
|
sub => sub.language.toLowerCase().includes('english')
|
||||||
)?.url || null;
|
)?.url || null;
|
||||||
|
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
streams,
|
streams: streamObjects,
|
||||||
subtitles: englishSubtitle
|
subtitle: englishSubtitle
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue