fixed warnings
This commit is contained in:
@@ -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<String>,
|
||||
description: Option<String>,
|
||||
thumb: Option<String>,
|
||||
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<DetailMetadata> {
|
||||
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,
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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<String>)> {
|
||||
let endpoint = endpoint.trim().trim_start_matches('/');
|
||||
if endpoint.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user