javtiful proxy
This commit is contained in:
@@ -4,10 +4,12 @@ use crate::{proxies::sxyprn::SxyprnProxy, util::requester::Requester};
|
||||
|
||||
pub mod sxyprn;
|
||||
pub mod hanimecdn;
|
||||
pub mod javtiful;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum AnyProxy {
|
||||
Sxyprn(SxyprnProxy),
|
||||
Javtiful(javtiful::JavtifulProxy),
|
||||
}
|
||||
|
||||
pub trait Proxy {
|
||||
@@ -26,12 +28,8 @@ impl Proxy for AnyProxy {
|
||||
requester: web::types::State<Requester>,
|
||||
) -> String {
|
||||
match self {
|
||||
AnyProxy::Sxyprn(p) => {
|
||||
p.get_video_url(
|
||||
url,
|
||||
requester,
|
||||
).await
|
||||
}
|
||||
AnyProxy::Sxyprn(p) => p.get_video_url(url, requester).await,
|
||||
AnyProxy::Javtiful(p) => p.get_video_url(url, requester).await,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user