From 29aa6fc007146e42bb340e1964e3183e84d350d1 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 1 Oct 2025 10:42:11 +0000 Subject: [PATCH] removed formats --- src/providers/sxyprn.rs | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/providers/sxyprn.rs b/src/providers/sxyprn.rs index e224461..f855519 100644 --- a/src/providers/sxyprn.rs +++ b/src/providers/sxyprn.rs @@ -262,11 +262,14 @@ impl SxyprnProvider { }) .filter(|url| url.starts_with("http") && !url.starts_with("https://bigwarp.io/")) .collect::>(); - + 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;