sxyprn fixes-ish

This commit is contained in:
Simon
2026-05-11 13:32:08 +00:00
committed by ForgeCode
parent b4774a0c0f
commit 5ba16ab338
6 changed files with 380 additions and 34 deletions

View File

@@ -476,6 +476,15 @@ impl SxyprnProvider {
let mut formats = vec![];
// Add sxyprn format
let sxyprn_url = format!(
"{}/proxy/sxyprn/post/{}",
options.public_url_base.as_deref().unwrap_or(""),
id
);
formats.push(
VideoFormat::new(sxyprn_url.clone(), "auto".to_string(), "mp4".to_string())
.format_note(sxyprn_url.split("/").nth(4).unwrap_or("sxyprn").to_string()),
);
let doodstream_urls: Vec<String> = title_links
.iter()
@@ -491,32 +500,24 @@ impl SxyprnProvider {
);
}
let lulustream_urls: Vec<String> = title_links
.iter()
.filter(|url| proxy_name_for_url(url).as_deref() == Some("lulustream"))
.map(|url| rewrite_hoster_url(options, url))
.collect();
// let lulustream_urls: Vec<String> = title_links
// .iter()
// .filter(|url| proxy_name_for_url(url).as_deref() == Some("lulustream"))
// .map(|url| rewrite_hoster_url(options, url))
// .collect();
for lulustream_url in lulustream_urls {
formats.push(
VideoFormat::m3u8(
lulustream_url.clone(),
"auto".to_string(),
"m3u8".to_string(),
)
.format_note("lulustream".to_string())
.format_id("lulustream".to_string()),
);
}
let sxyprn_url = format!(
"{}/proxy/sxyprn/post/{}",
options.public_url_base.as_deref().unwrap_or(""),
id
);
formats.push(
VideoFormat::new(sxyprn_url.clone(), "auto".to_string(), "mp4".to_string())
.format_note(sxyprn_url.split("/").nth(4).unwrap_or("sxyprn").to_string()),
);
// for lulustream_url in lulustream_urls {
// formats.push(
// VideoFormat::m3u8(
// lulustream_url.clone(),
// "auto".to_string(),
// "m3u8".to_string(),
// )
// .format_note("lulustream".to_string())
// .format_id("lulustream".to_string()),
// );
// }
// Also collect and transform vidara.so URLs to proxy format and add as formats
let vidara_urls: Vec<String> = title_links
.iter()
@@ -534,7 +535,7 @@ impl SxyprnProvider {
let mut video_item = VideoItem::new(
id.clone(),
title,
format!("{}/post/{}", self.url, id.clone()),
url.clone(),
"sxyprn".to_string(),
thumb,
duration,