removed formats
This commit is contained in:
@@ -262,11 +262,14 @@ impl SxyprnProvider {
|
|||||||
})
|
})
|
||||||
.filter(|url| url.starts_with("http") && !url.starts_with("https://bigwarp.io/"))
|
.filter(|url| url.starts_with("http") && !url.starts_with("https://bigwarp.io/"))
|
||||||
.collect::<Vec<String>>();
|
.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(
|
let mut video_item = VideoItem::new(
|
||||||
id,
|
id,
|
||||||
title,
|
title,
|
||||||
url.to_string(),
|
video_item_url,
|
||||||
"sxyprn".to_string(),
|
"sxyprn".to_string(),
|
||||||
thumb,
|
thumb,
|
||||||
duration,
|
duration,
|
||||||
@@ -275,22 +278,6 @@ impl SxyprnProvider {
|
|||||||
if let Some(p) = preview {
|
if let Some(p) = preview {
|
||||||
video_item = video_item.preview(p);
|
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);
|
items.push(video_item);
|
||||||
}
|
}
|
||||||
return items;
|
return items;
|
||||||
|
|||||||
Reference in New Issue
Block a user