xxdbx bugfix
This commit is contained in:
@@ -120,9 +120,9 @@ impl XxdbxProvider {
|
|||||||
let search_string = query.trim().to_string();
|
let search_string = query.trim().to_string();
|
||||||
let mut search_type = "search";
|
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::<Vec<String>>().contains(&search_string) {
|
||||||
search_type = "channels";
|
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::<Vec<String>>().contains(&search_string) {
|
||||||
search_type = "stars";
|
search_type = "stars";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,8 +159,7 @@ impl XxdbxProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn get_video_items_from_html(&self, html: String) -> Vec<VideoItem> {
|
fn get_video_items_from_html(&self, html: String) -> Vec<VideoItem> {
|
||||||
if html.is_empty() {
|
if html.is_empty() || html.contains("404 Not Found") {
|
||||||
println!("HTML is empty");
|
|
||||||
return vec![];
|
return vec![];
|
||||||
}
|
}
|
||||||
let mut items: Vec<VideoItem> = Vec::new();
|
let mut items: Vec<VideoItem> = Vec::new();
|
||||||
|
|||||||
Reference in New Issue
Block a user