fixes and cleanup

This commit is contained in:
Simon
2026-03-05 18:18:48 +00:00
parent 76fd5a4f4f
commit 2627505ade
49 changed files with 3245 additions and 1376 deletions

View File

@@ -2,9 +2,10 @@ use ntex::web;
use crate::{proxies::sxyprn::SxyprnProxy, util::requester::Requester};
pub mod sxyprn;
pub mod hanimecdn;
pub mod hqpornerthumb;
pub mod javtiful;
pub mod sxyprn;
#[derive(Debug, Clone)]
pub enum AnyProxy {
@@ -13,23 +14,14 @@ pub enum AnyProxy {
}
pub trait Proxy {
async fn get_video_url(
&self,
url: String,
requester: web::types::State<Requester>,
) -> String;
async fn get_video_url(&self, url: String, requester: web::types::State<Requester>) -> String;
}
impl Proxy for AnyProxy {
async fn get_video_url(
&self,
url: String,
requester: web::types::State<Requester>,
) -> String {
async fn get_video_url(&self, url: String, requester: web::types::State<Requester>) -> String {
match self {
AnyProxy::Sxyprn(p) => p.get_video_url(url, requester).await,
AnyProxy::Javtiful(p) => p.get_video_url(url, requester).await,
}
}
}
}