adaptions format for paradise hill

This commit is contained in:
Simon
2025-09-19 11:39:34 +00:00
parent 584abfd431
commit 913472ebfb
3 changed files with 132 additions and 53 deletions

View File

@@ -4,7 +4,7 @@ use htmlentity::entity::{decode, ICodedDataTrait};
use futures::future::join_all;
use crate::providers::Provider;
use crate::util::cache::VideoCache;
use crate::videos::ServerOptions;
use crate::videos::{self, ServerOptions};
use crate::videos::{VideoItem};
use crate::DbPool;
use crate::util::requester::Requester;
@@ -145,15 +145,22 @@ impl ParadisehillProvider {
.split("\"").collect::<Vec<&str>>()[0].replace("\\", "").to_string();
let id = video_url.split("/").collect::<Vec<&str>>().last().unwrap().split("_").collect::<Vec<&str>>()[0]
.to_string();
let format = videos::VideoFormat::new(video_url.clone(), "1080".to_string(), "mp4".to_string())
.protocol("https".to_string())
.format_id("mp4-1080")
;
let video_item = VideoItem::new(
id,
title,
video_url.clone(),
url_str.clone(),
"paradisehill".to_string(),
thumb,
0,
)
.aspect_ratio(0.697674419 as f32)
.formats(vec![format])
;
return Ok(video_item);