feat(downloader): add rqbit impl
This commit is contained in:
@@ -61,15 +61,15 @@ sea-orm-migration = { version = "1.1", features = ["runtime-tokio-rustls"] }
|
||||
rss = "2"
|
||||
fancy-regex = "0.14"
|
||||
maplit = "1.0.2"
|
||||
lightningcss = "1.0.0-alpha.61"
|
||||
lightningcss = "1.0.0-alpha.65"
|
||||
html-escape = "0.2.13"
|
||||
opendal = { version = "0.51.0", features = ["default", "services-fs"] }
|
||||
opendal = { version = "0.53", features = ["default", "services-fs"] }
|
||||
zune-image = "0.4.15"
|
||||
once_cell = "1.20.2"
|
||||
scraper = "0.23"
|
||||
|
||||
jwt-authorizer = "0.15.0"
|
||||
log = "0.4.22"
|
||||
log = "0.4"
|
||||
async-graphql = { version = "7", features = [] }
|
||||
async-graphql-axum = "7"
|
||||
seaography = { version = "1.1" }
|
||||
@@ -100,6 +100,7 @@ serde_yaml = "0.9.34"
|
||||
downloader = { workspace = true }
|
||||
util = { workspace = true }
|
||||
fetch = { workspace = true }
|
||||
string-interner = "0.19.0"
|
||||
|
||||
[dev-dependencies]
|
||||
serial_test = "3"
|
||||
|
||||
@@ -35,7 +35,7 @@ use crate::{app::AppContextTrait, errors::RecorderError, models::auth::AuthType}
|
||||
|
||||
pub struct OidcHttpClient(pub Arc<HttpClient>);
|
||||
|
||||
impl<'a> Deref for OidcHttpClient {
|
||||
impl Deref for OidcHttpClient {
|
||||
type Target = HttpClient;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
@@ -170,8 +170,8 @@ pub struct OidcAuthService {
|
||||
}
|
||||
|
||||
impl OidcAuthService {
|
||||
pub async fn build_authorization_request<'a>(
|
||||
&'a self,
|
||||
pub async fn build_authorization_request(
|
||||
&self,
|
||||
redirect_uri: &str,
|
||||
) -> Result<OidcAuthRequest, AuthError> {
|
||||
let oidc_provider_client = OidcHttpClient(self.oidc_provider_client.clone());
|
||||
@@ -247,8 +247,8 @@ impl OidcAuthService {
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
pub async fn extract_authorization_request_callback<'a>(
|
||||
&'a self,
|
||||
pub async fn extract_authorization_request_callback(
|
||||
&self,
|
||||
query: OidcAuthCallbackQuery,
|
||||
) -> Result<OidcAuthCallbackPayload, AuthError> {
|
||||
let oidc_http_client = OidcHttpClient(self.oidc_provider_client.clone());
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
pub mod app_error;
|
||||
pub mod ext;
|
||||
pub mod response;
|
||||
|
||||
pub use app_error::{RecorderError, RecorderResult};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::{fmt::Debug, ops::Deref};
|
||||
|
||||
use fetch::{FetchError, HttpClient, HttpClientTrait, client::HttpClientCookiesAuth};
|
||||
use fetch::{HttpClient, HttpClientTrait, client::HttpClientCookiesAuth};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use url::Url;
|
||||
|
||||
@@ -24,7 +24,6 @@ impl Debug for MikanAuthSecrecy {
|
||||
impl MikanAuthSecrecy {
|
||||
pub fn into_cookie_auth(self, url: &Url) -> Result<HttpClientCookiesAuth, RecorderError> {
|
||||
HttpClientCookiesAuth::from_cookies(&self.cookie, url, self.user_agent)
|
||||
.map_err(FetchError::from)
|
||||
.map_err(RecorderError::from)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user