search bugfix

This commit is contained in:
Simon
2025-12-04 20:12:57 +00:00
parent 9739560c03
commit 632931f515

View File

@@ -158,7 +158,9 @@ impl PmvhavenProvider {
video_url = format!("{}&stars={}", video_url, star); video_url = format!("{}&stars={}", video_url, star);
} else if let Some(category) = self.categories.read().unwrap().iter().find(|s| s.to_ascii_lowercase() == search_string.to_ascii_lowercase()) { } else if let Some(category) = self.categories.read().unwrap().iter().find(|s| s.to_ascii_lowercase() == search_string.to_ascii_lowercase()) {
video_url = format!("{}&tagMode=AND&tags={}", video_url, category); video_url = format!("{}&tagMode=AND&tags={}", video_url, category);
} } else {
video_url = format!("{}&q={}", video_url, search_string);
}
let old_items = match cache.get(&video_url) { let old_items = match cache.get(&video_url) {
Some((time, items)) => { Some((time, items)) => {
if time.elapsed().unwrap_or_default().as_secs() < 60 * 5 { if time.elapsed().unwrap_or_default().as_secs() < 60 * 5 {