This commit is contained in:
Simon
2026-04-05 20:31:38 +00:00
parent 9773590f64
commit 7b464fe796
10 changed files with 815 additions and 565 deletions

View File

@@ -177,15 +177,18 @@ impl HomoxxxProvider {
let search_string = query.to_lowercase().trim().replace(" ", "-");
let mut video_url = format!("{}/search/{}/{}/", self.url, search_string, page);
if search_string.starts_with("@") {
let url_part = search_string
.split("@")
.collect::<Vec<&str>>()
.get(1)
.copied()
.unwrap_or_default()
.replace(":", "/");
video_url = format!("{}/{}/", self.url, url_part);
let trimmed = query.trim().trim_start_matches('@');
if let Some((kind, value)) = trimmed.split_once(':') {
let kind = kind.trim().to_ascii_lowercase();
let value = value.trim().replace(' ', "-");
if !value.is_empty()
&& matches!(
kind.as_str(),
"models" | "pornstars" | "stars" | "channels" | "categories" | "tags"
)
{
video_url = format!("{}/{}/{}/", self.url, kind, value);
}
}
// Check our Video Cache. If the result is younger than 1 hour, we return it.
let old_items = match cache.get(&video_url) {