Merge branch 'main' of billenius.com:love/iptvnator_rs

This commit is contained in:
Love 2023-01-19 12:22:35 +01:00
commit 608176262d

View File

@ -16,13 +16,14 @@ async fn main() {
// Dont't perform a search if user has just watched, instead present the previous search // Dont't perform a search if user has just watched, instead present the previous search
if search_result.is_none() { if search_result.is_none() {
let search = readline.input("Search by name: "); let search = readline.input("Search by name: ");
let search = search.trim();
// If they want to quit, let them- // If they want to quit, let them-
if search.trim() == "q" { if search == "q" {
break; break;
} }
search_result = Some(Rc::new(parser.find(&search))); search_result = Some(Rc::new(parser.find(search)));
if search_result.as_ref().unwrap().len() == 0 { if search_result.as_ref().unwrap().len() == 0 {
println!("Nothing found"); println!("Nothing found");