adapted pmvhaven
This commit is contained in:
14
src/api.rs
14
src/api.rs
@@ -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(),
|
favicon: "https://www.google.com/s2/favicons?sz=64&domain=pornhub.com".to_string(),
|
||||||
status: "active".to_string(),
|
status: "active".to_string(),
|
||||||
categories: vec![],
|
categories: vec![],
|
||||||
options: vec![
|
options: vec![ChannelOption {
|
||||||
ChannelOption {
|
|
||||||
id: "sort".to_string(),
|
id: "sort".to_string(),
|
||||||
title: "Sort".to_string(),
|
title: "Sort".to_string(),
|
||||||
description: "Sort the Videos".to_string(), //"Sort the videos by Date or Name.".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,
|
multiSelect: false,
|
||||||
},],
|
}],
|
||||||
nsfw: true,
|
nsfw: true,
|
||||||
});
|
});
|
||||||
|
if clientversion >= ClientVersion::new(22, 101, "22e".to_string()) {
|
||||||
// pmvhaven
|
// pmvhaven
|
||||||
status.add_channel(Channel {
|
status.add_channel(Channel {
|
||||||
id: "pmvhaven".to_string(),
|
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(),
|
favicon: "https://www.google.com/s2/favicons?sz=64&domain=pmvhaven.com".to_string(),
|
||||||
status: "active".to_string(),
|
status: "active".to_string(),
|
||||||
categories: vec![],
|
categories: vec![],
|
||||||
options: vec![
|
options: vec![ChannelOption {
|
||||||
ChannelOption {
|
|
||||||
id: "category".to_string(),
|
id: "category".to_string(),
|
||||||
title: "Category".to_string(),
|
title: "Category".to_string(),
|
||||||
description: "Category of PMV Video get".to_string(), //"Sort the videos by Date or Name.".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,
|
multiSelect: false,
|
||||||
},],
|
}],
|
||||||
nsfw: true,
|
nsfw: true,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
if clientversion >= ClientVersion::new(22, 97, "22a".to_string()) {
|
if clientversion >= ClientVersion::new(22, 97, "22a".to_string()) {
|
||||||
// perverzija
|
// perverzija
|
||||||
status.add_channel(Channel {
|
status.add_channel(Channel {
|
||||||
@@ -428,7 +428,7 @@ async fn videos_post(
|
|||||||
page.to_string(),
|
page.to_string(),
|
||||||
perPage.to_string(),
|
perPage.to_string(),
|
||||||
featured.clone(),
|
featured.clone(),
|
||||||
category.clone()
|
category.clone(),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
videos.items = video_items.clone();
|
videos.items = video_items.clone();
|
||||||
|
|||||||
@@ -200,10 +200,10 @@ impl PmvhavenVideo {
|
|||||||
thumbnail,
|
thumbnail,
|
||||||
self.duration as u32,
|
self.duration as u32,
|
||||||
)
|
)
|
||||||
.formats(vec![
|
//.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/{}/{}_{}.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())
|
// 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);
|
.views(self.views);
|
||||||
item = match self.creator{
|
item = match self.creator{
|
||||||
|
|||||||
Reference in New Issue
Block a user