lowercase
This commit is contained in:
parent
44b406c4b1
commit
ecf3df8c15
@ -60,6 +60,6 @@ impl<'a> Readline<'a> {
|
||||
self.stdout.flush().unwrap();
|
||||
let mut buffer = String::new();
|
||||
self.stdin.read_line(&mut buffer).unwrap();
|
||||
buffer
|
||||
buffer.to_lowercase()
|
||||
}
|
||||
}
|
||||
|
@ -60,11 +60,12 @@ async fn main() {
|
||||
refresh(&parser).await;
|
||||
continue;
|
||||
} else if user_wish == "d" {
|
||||
let selection = readline.input("Download all or select in comma separated [a | 1,2,3,4]: ");
|
||||
let selection =
|
||||
readline.input("Download all or select in comma separated [a | 1,2,3,4]: ");
|
||||
let selection = selection.trim();
|
||||
|
||||
let to_download = loop {
|
||||
break if selection.to_lowercase() == "a" {
|
||||
break if selection == "a" {
|
||||
println!("Downloading all");
|
||||
search_result.as_ref().unwrap().clone()
|
||||
} else {
|
||||
|
@ -35,10 +35,10 @@ impl Parser {
|
||||
}
|
||||
|
||||
pub fn find(&self, name: &str) -> Vec<&M3u8> {
|
||||
let name = name.to_uppercase();
|
||||
let name = name.to_lowercase();
|
||||
self.m3u8_items
|
||||
.iter()
|
||||
.filter(|item| item.name.to_uppercase().contains(&name) || item.tvg_id.contains(&name))
|
||||
.filter(|item| item.name.to_lowercase().contains(&name) || item.tvg_id.contains(&name))
|
||||
.collect()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user