From 0df84a1fac1b2ef0ad618f950a144f2df4616d65 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 30 Mar 2026 02:34:26 +0000 Subject: [PATCH] fixed warnings --- src/providers/pornhd3x.rs | 18 +++--------------- src/providers/shooshtime.rs | 4 ++-- src/proxies/shooshtime.rs | 4 ---- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/src/providers/pornhd3x.rs b/src/providers/pornhd3x.rs index 335191e..bfedfdc 100644 --- a/src/providers/pornhd3x.rs +++ b/src/providers/pornhd3x.rs @@ -68,7 +68,6 @@ enum Target { #[derive(Debug, Clone)] struct ListStub { - slug: String, detail_url: String, title: String, thumb: String, @@ -78,7 +77,6 @@ struct ListStub { #[derive(Debug, Clone, Default)] struct DetailMetadata { title: Option, - description: Option, thumb: Option, studio: Option<(String, String)>, categories: Vec<(String, String)>, @@ -762,18 +760,17 @@ impl Pornhd3xProvider { .map(|value| self.normalize_url(value)) .filter(|value| !value.is_empty()); - let slug = detail_url + if detail_url .trim_end_matches('/') .rsplit('/') .next() .unwrap_or_default() - .to_string(); - if slug.is_empty() { + .is_empty() + { continue; } items.push(ListStub { - slug, detail_url, title, thumb, @@ -812,7 +809,6 @@ impl Pornhd3xProvider { fn parse_detail_metadata(&self, html: &str) -> Result { let document = Html::parse_document(html); let title_selector = Self::selector(".mvic-desc h3")?; - let description_selector = Self::selector("meta[name=\"description\"]")?; let og_image_selector = Self::selector("meta[property=\"og:image\"]")?; let studio_selector = Self::selector("#bread a[href*=\"/studio/\"]")?; let category_selector = Self::selector(".mvici-left a[href*=\"/category/\"]")?; @@ -826,13 +822,6 @@ impl Pornhd3xProvider { .map(|value| Self::text_of(&value)) .filter(|value| !value.is_empty()); - let description = document - .select(&description_selector) - .next() - .and_then(|value| value.value().attr("content")) - .map(Self::decode_html) - .filter(|value| !value.is_empty()); - let thumb = document .select(&og_image_selector) .next() @@ -886,7 +875,6 @@ impl Pornhd3xProvider { Ok(DetailMetadata { uploaded_at: title.as_deref().and_then(Self::parse_uploaded_at), title, - description, thumb, studio, categories, diff --git a/src/providers/shooshtime.rs b/src/providers/shooshtime.rs index 063f4dc..eab4f36 100644 --- a/src/providers/shooshtime.rs +++ b/src/providers/shooshtime.rs @@ -974,14 +974,14 @@ impl ShooshtimeProvider { .map(|value| self.normalize_url(&value)); let mut formats = Vec::new(); - if let Some(url) = &primary_url { + if primary_url.is_some() { let format_url = self.proxied_video(options, page_url, Some(&primary_quality)); formats.push( VideoFormat::new(format_url, primary_quality.clone(), "mp4".to_string()) .format_id(primary_quality.clone()), ); } - if let Some(url) = &alt_url { + if alt_url.is_some() { let format_url = self.proxied_video(options, page_url, Some(&alt_quality)); formats.push( VideoFormat::new(format_url, alt_quality.clone(), "mp4".to_string()) diff --git a/src/proxies/shooshtime.rs b/src/proxies/shooshtime.rs index 6571847..d94ca18 100644 --- a/src/proxies/shooshtime.rs +++ b/src/proxies/shooshtime.rs @@ -18,10 +18,6 @@ struct SourceCandidate { pub struct ShooshtimeProxy {} impl ShooshtimeProxy { - pub fn new() -> Self { - Self {} - } - fn normalize_detail_request(endpoint: &str) -> Option<(String, Option)> { let endpoint = endpoint.trim().trim_start_matches('/'); if endpoint.is_empty() {