adapted pmvhaven

This commit is contained in:
Simon
2025-07-20 05:14:59 +00:00
parent 5f084970d2
commit 323fbfd5c9
2 changed files with 82 additions and 82 deletions

View File

@@ -124,8 +124,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
favicon: "https://www.google.com/s2/favicons?sz=64&domain=pornhub.com".to_string(),
status: "active".to_string(),
categories: vec![],
options: vec![
ChannelOption {
options: vec![ChannelOption {
id: "sort".to_string(),
title: "Sort".to_string(),
description: "Sort the Videos".to_string(), //"Sort the videos by Date or Name.".to_string(),
@@ -150,9 +149,10 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
},
],
multiSelect: false,
},],
}],
nsfw: true,
});
if clientversion >= ClientVersion::new(22, 101, "22e".to_string()) {
// pmvhaven
status.add_channel(Channel {
id: "pmvhaven".to_string(),
@@ -162,8 +162,7 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
favicon: "https://www.google.com/s2/favicons?sz=64&domain=pmvhaven.com".to_string(),
status: "active".to_string(),
categories: vec![],
options: vec![
ChannelOption {
options: vec![ChannelOption {
id: "category".to_string(),
title: "Category".to_string(),
description: "Category of PMV Video get".to_string(), //"Sort the videos by Date or Name.".to_string(),
@@ -200,9 +199,10 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
},
],
multiSelect: false,
},],
}],
nsfw: true,
});
}
if clientversion >= ClientVersion::new(22, 97, "22a".to_string()) {
// perverzija
status.add_channel(Channel {
@@ -428,7 +428,7 @@ async fn videos_post(
page.to_string(),
perPage.to_string(),
featured.clone(),
category.clone()
category.clone(),
)
.await;
videos.items = video_items.clone();

View File

@@ -200,10 +200,10 @@ impl PmvhavenVideo {
thumbnail,
self.duration as u32,
)
.formats(vec![
VideoFormat::new(format!("https://storage.pmvhaven.com/{}/{}_{}.mp4", video_id, encoded_title, video_id), "1080".to_string(), "mp4".to_string()).protocol("https".to_string()),
VideoFormat::new(format!("https://storage.pmvhaven.com/{}/264_{}.mp4", video_id, video_id), "1080".to_string(), "mp4".to_string()).protocol("https".to_string())
])
//.formats(vec![
// VideoFormat::new(format!("https://storage.pmvhaven.com/{}/{}_{}.mp4", video_id, encoded_title, video_id), "1080".to_string(), "mp4".to_string()).protocol("https".to_string()),
// VideoFormat::new(format!("https://storage.pmvhaven.com/{}/264_{}.mp4", video_id, video_id), "1080".to_string(), "mp4".to_string()).protocol("https".to_string())
//])
.views(self.views);
item = match self.creator{