rul34video

This commit is contained in:
Simon
2025-07-20 09:10:07 +00:00
parent 2d1def2dfe
commit e18e4da559
3 changed files with 366 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ use crate::providers::hanime::HanimeProvider;
use crate::providers::perverzija::PerverzijaProvider;
use crate::providers::pmvhaven::PmvhavenProvider;
use crate::providers::pornhub::PornhubProvider;
use crate::providers::rule34video::Rule34videoProvider;
use crate::providers::spankbang::SpankbangProvider;
use crate::util::cache::VideoCache;
use crate::{DbPool, providers::*, status::*, videos::*};
@@ -387,6 +388,48 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
}],
nsfw: true,
});
// pronhub
status.add_channel(Channel {
id: "rule34video".to_string(),
name: "Rule34Video".to_string(),
description: "If it exists, there is porn".to_string(),
premium: false,
favicon: "https://www.google.com/s2/favicons?sz=64&domain=rule34video.com".to_string(),
status: "active".to_string(),
categories: vec![],
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(),
systemImage: "list.number".to_string(),
colorName: "blue".to_string(),
options: vec![
FilterOption {
id: "post_date".to_string(),
title: "Newest".to_string(),
},
FilterOption {
id: "video_viewed".to_string(),
title: "Most Viewed".to_string(),
},
FilterOption {
id: "rating".to_string(),
title: "Top Rated".to_string(),
},
FilterOption {
id: "duration".to_string(),
title: "Longest".to_string(),
},
FilterOption {
id: "pseudo_random".to_string(),
title: "Random".to_string(),
},
],
multiSelect: false,
}],
nsfw: true,
});
status.iconUrl = format!("http://{}/favicon.ico", host).to_string();
Ok(web::HttpResponse::Ok().json(&status))
}
@@ -501,6 +544,8 @@ pub fn get_provider(channel: &str) -> Option<AnyProvider> {
"spankbang" => Some(AnyProvider::Spankbang(SpankbangProvider::new())),
"pornhub" => Some(AnyProvider::Pornhub(PornhubProvider::new())),
"pmvhaven" => Some(AnyProvider::Pmvhaven(PmvhavenProvider::new())),
"rule34video" => Some(AnyProvider::Rule34video(Rule34videoProvider::new())),
_ => Some(AnyProvider::Perverzija(PerverzijaProvider::new())),
}
}