bugfix for search

This commit is contained in:
Simon
2025-08-29 20:17:48 +00:00
parent bb5f610c60
commit 4f1b58d583

View File

@@ -83,7 +83,7 @@ impl Porn00Provider {
query: &str, query: &str,
) -> Result<Vec<VideoItem>> { ) -> Result<Vec<VideoItem>> {
let search_string = query.to_lowercase().trim().replace(" ", "-"); let search_string = query.to_lowercase().trim().replace(" ", "-");
let video_url = format!("{}/search/{}?mode=async&function=get_block&block_id=list_videos_videos_list_search_result&q=a&category_ids=&sort_by=&from_videos={}&from_albums={}&", self.url, search_string, page, page); let video_url = format!("{}/search/{}/?mode=async&function=get_block&block_id=list_videos_videos_list_search_result&q=a&category_ids=&sort_by=&from_videos={}&from_albums={}&", self.url, search_string, page, page);
// Check our Video Cache. If the result is younger than 1 hour, we return it. // Check our Video Cache. If the result is younger than 1 hour, we return it.
let old_items = match cache.get(&video_url) { let old_items = match cache.get(&video_url) {
Some((time, items)) => { Some((time, items)) => {
@@ -108,7 +108,7 @@ impl Porn00Provider {
if response.status().is_redirection(){ if response.status().is_redirection(){
response = client.get(self.url.clone() + response.headers()["Location"].to_str().unwrap()) response = client.get(response.headers()["Location"].to_str().unwrap())
// .proxy(proxy.clone()) // .proxy(proxy.clone())
.send().await?; .send().await?;
} }