fixed s and better write of m3u8
This commit is contained in:
parent
2c52b4fcfa
commit
7e5d1f3651
@ -18,7 +18,7 @@ impl Display for M3u8 {
|
||||
} else {
|
||||
self.name.bold()
|
||||
};
|
||||
f.write_fmt(format_args!("{}({})", colored_name, self.link))?;
|
||||
f.write_fmt(format_args!("{} ({})", colored_name, self.link))?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
@ -44,12 +44,16 @@ fn main() {
|
||||
buf = String::new();
|
||||
stdin.read_line(&mut buf).unwrap();
|
||||
|
||||
let user_wish = buf.trim();
|
||||
// If they want to quit, let them-
|
||||
if buf.trim() == "q" {
|
||||
if user_wish == "q" {
|
||||
break;
|
||||
} else if user_wish == "s" {
|
||||
search_result = None;
|
||||
continue;
|
||||
}
|
||||
|
||||
let choosen = buf.trim().parse::<usize>();
|
||||
let choosen = user_wish.parse::<usize>();
|
||||
match choosen {
|
||||
Ok(k) => {
|
||||
let search_result = search_result.as_ref().unwrap().clone();
|
||||
|
Loading…
x
Reference in New Issue
Block a user