diff --git a/src/providers/xxdbx.rs b/src/providers/xxdbx.rs index 3306af8..ef4c2b2 100644 --- a/src/providers/xxdbx.rs +++ b/src/providers/xxdbx.rs @@ -120,9 +120,9 @@ impl XxdbxProvider { let search_string = query.trim().to_string(); let mut search_type = "search"; - if self.channels.read().unwrap().contains(&search_string) { + if self.channels.read().unwrap().iter().map(|s|s.to_ascii_lowercase()).collect::>().contains(&search_string) { search_type = "channels"; - } else if self.stars.read().unwrap().contains(&search_string) { + } else if self.stars.read().unwrap().iter().map(|s|s.to_ascii_lowercase()).collect::>().contains(&search_string) { search_type = "stars"; } @@ -159,8 +159,7 @@ impl XxdbxProvider { } fn get_video_items_from_html(&self, html: String) -> Vec { - if html.is_empty() { - println!("HTML is empty"); + if html.is_empty() || html.contains("404 Not Found") { return vec![]; } let mut items: Vec = Vec::new();