removed formats

This commit is contained in:
Simon
2025-10-01 10:42:11 +00:00
parent 259106fa13
commit 29aa6fc007

View File

@@ -262,11 +262,14 @@ impl SxyprnProvider {
})
.filter(|url| url.starts_with("http") && !url.starts_with("https://bigwarp.io/"))
.collect::<Vec<String>>();
let video_item_url = match stream_urls.first() {
Some(u) => u.clone(),
None => video_url.clone(),
};
let mut video_item = VideoItem::new(
id,
title,
url.to_string(),
video_item_url,
"sxyprn".to_string(),
thumb,
duration,
@@ -275,22 +278,6 @@ impl SxyprnProvider {
if let Some(p) = preview {
video_item = video_item.preview(p);
}
let mut formats_vec = vec![];
formats_vec.push(
VideoFormat::new(video_url.clone(), "1080".to_string(), "m3u8".to_string())
.format_id(video_url.clone())
.ext("m3u8".to_string())
.video_ext("m3u8".to_string())
);
for surl in stream_urls {
formats_vec.push(
videos::VideoFormat::new(surl.clone(), "1080".to_string(), "m3u8".to_string())
.format_id(surl)
.ext("m3u8".to_string())
.video_ext("m3u8".to_string())
);
}
video_item = video_item.formats(formats_vec);
items.push(video_item);
}
return items;