supjav fix

This commit is contained in:
Simon
2026-06-27 19:28:14 +00:00
parent bf8d1c9f9e
commit 83e433d09b
2 changed files with 18 additions and 5 deletions

View File

@@ -1268,7 +1268,8 @@ print(json.dumps({
item.tags = Some(parsed_tags);
}
if let Some((_master_url, formats)) = self.resolve_player(page_url, &players).await? {
if let Some((master_url, formats)) = self.resolve_player(page_url, &players).await? {
item.url = master_url;
if !formats.is_empty() {
item.formats = Some(formats);
}
@@ -1334,7 +1335,7 @@ print(json.dumps({
async move { provider.enrich_video(item).await }
}),
)
.buffer_unordered(4)
.buffer_unordered(2)
.collect::<Vec<_>>()
.await;
@@ -1442,7 +1443,7 @@ print(json.dumps({
let provider = self.clone();
async move { provider.enrich_video(item).await }
}))
.buffer_unordered(4)
.buffer_unordered(2)
.collect::<Vec<_>>()
.await)
}
@@ -1525,7 +1526,7 @@ print(json.dumps({
let provider = self.clone();
async move { provider.enrich_video(item).await }
}))
.buffer_unordered(4)
.buffer_unordered(2)
.collect::<Vec<_>>()
.await)
}
@@ -1619,6 +1620,16 @@ impl Provider for SupjavProvider {
match result {
Ok(mut videos) => {
for video in &mut videos {
if video.url.contains(".m3u8")
&& !video.url.starts_with("/proxy/supjav/")
&& !video.url.contains("/proxy/supjav/")
{
video.url = build_proxy_url(
&rewrite_options,
CHANNEL_ID,
&strip_url_scheme(&video.url),
);
}
if let Some(formats) = video.formats.as_mut() {
for format in formats {
if format.url.starts_with("/proxy/supjav/")

View File

@@ -40,8 +40,10 @@ impl SupjavProxy {
let host = host.to_ascii_lowercase();
if !(host == "turbovidhls.com"
|| host == "turboviplay.com"
|| host == "turbosplayer.com"
|| host.ends_with(".turboviplay.com")
|| host.ends_with(".turbovidhls.com"))
|| host.ends_with(".turbovidhls.com")
|| host.ends_with(".turbosplayer.com"))
{
return false;
}