xfree fix
This commit is contained in:
@@ -31,6 +31,7 @@ titlecase = "3.6.0"
|
||||
dashmap = "6.1.0"
|
||||
lru = "0.16.3"
|
||||
rand = "0.10.0"
|
||||
chrono = "0.4.44"
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = "allow"
|
||||
|
||||
@@ -244,6 +244,7 @@ async fn videos_post(
|
||||
.unwrap_or("")
|
||||
.to_string();
|
||||
let duration = video_request.duration.as_deref().unwrap_or("").to_string();
|
||||
let sexuality = video_request.sexuality.as_deref().unwrap_or("").to_string();
|
||||
let options = ServerOptions {
|
||||
featured: Some(featured),
|
||||
category: Some(category),
|
||||
@@ -256,6 +257,7 @@ async fn videos_post(
|
||||
categories: Some(categories),
|
||||
duration: Some(duration),
|
||||
sort: Some(sort.clone()),
|
||||
sexuality: Some(sexuality),
|
||||
};
|
||||
let mut video_items = run_provider_guarded(
|
||||
&channel,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -185,6 +185,15 @@ impl Requester {
|
||||
&mut self,
|
||||
url: &str,
|
||||
_http_version: Option<Version>,
|
||||
) -> Result<String, AnyErr> {
|
||||
self.get_with_headers(url, Vec::new(), _http_version).await
|
||||
}
|
||||
|
||||
pub async fn get_with_headers(
|
||||
&mut self,
|
||||
url: &str,
|
||||
headers: Vec<(String, String)>,
|
||||
_http_version: Option<Version>,
|
||||
) -> Result<String, AnyErr> {
|
||||
let http_version = match _http_version {
|
||||
Some(v) => v,
|
||||
@@ -192,6 +201,9 @@ impl Requester {
|
||||
};
|
||||
loop {
|
||||
let mut request = self.client.get(url).version(http_version);
|
||||
for (key, value) in headers.iter() {
|
||||
request = request.header(key, value);
|
||||
}
|
||||
if self.proxy {
|
||||
if let Ok(proxy_url) = env::var("BURP_URL") {
|
||||
let proxy = Proxy::all(&proxy_url).unwrap();
|
||||
@@ -265,6 +277,9 @@ impl Requester {
|
||||
|
||||
// Retry the original URL with the updated client & (optional) proxy
|
||||
let mut request = self.client.get(url).version(Version::HTTP_11);
|
||||
for (key, value) in headers.iter() {
|
||||
request = request.header(key, value);
|
||||
}
|
||||
if self.proxy {
|
||||
if let Ok(proxy_url) = env::var("BURP_URL") {
|
||||
let proxy = Proxy::all(&proxy_url).unwrap();
|
||||
|
||||
@@ -50,7 +50,7 @@ pub struct VideosRequest {
|
||||
pub networks: Option<String>, //
|
||||
pub stars: Option<String>, //
|
||||
pub categories: Option<String>,
|
||||
pub duration: Option<String>,
|
||||
pub duration: Option<String>
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
||||
@@ -66,6 +66,7 @@ pub struct ServerOptions {
|
||||
pub categories: Option<String>, //
|
||||
pub duration: Option<String>, //
|
||||
pub sort: Option<String>, //
|
||||
pub sexuality: Option<String>, //
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, Debug)]
|
||||
|
||||
Reference in New Issue
Block a user