upgrades
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user