implemented pornhub

This commit is contained in:
Simon
2025-07-16 17:51:41 +00:00
parent 0a60d12525
commit ae527041ae
4 changed files with 269 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ use tokio::{task};
use crate::providers::hanime::HanimeProvider;
use crate::providers::perverzija::PerverzijaProvider;
use crate::providers::pornhub::PornhubProvider;
use crate::providers::spankbang::SpankbangProvider;
use crate::util::cache::VideoCache;
use crate::{providers::*, status::*, videos::*, DbPool};
@@ -115,7 +116,17 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
.unwrap_or_default()
.to_string();
let mut status = Status::new();
status.add_channel(Channel {
id: "pornhub".to_string(),
name: "Pornhub".to_string(),
description: "Pornhub Free Videos".to_string(),
premium: false,
favicon: "https://www.google.com/s2/favicons?sz=64&domain=pornhub.com".to_string(),
status: "active".to_string(),
categories: vec![],
options: vec![],
nsfw: true,
});
if clientversion >= ClientVersion::new(22,97,"22a".to_string()){
//add perverzija
status.add_channel(Channel {
@@ -370,6 +381,7 @@ pub fn get_provider(channel: &str) -> Option<AnyProvider> {
"perverzija" => Some(AnyProvider::Perverzija(PerverzijaProvider::new())),
"hanime" => Some(AnyProvider::Hanime(HanimeProvider::new())),
"spankbang" => Some(AnyProvider::Spankbang(SpankbangProvider::new())),
"pornhub" => Some(AnyProvider::Pornhub(PornhubProvider::new())),
_ => Some(AnyProvider::Perverzija(PerverzijaProvider::new())),
}
}