mirror of
https://github.com/mrfluffy-dev/kami.git
synced 2026-01-17 20:50:34 +00:00
basic tui implementation
This commit is contained in:
@@ -13,7 +13,7 @@ pub fn anime_stream(search: String, episode: u32, resume: bool) {
|
||||
string_input("Search anime: ")
|
||||
};
|
||||
|
||||
let anime_list = anime_names(&query);
|
||||
let anime_list = anime_names(query);
|
||||
let mut count = 0;
|
||||
print!("\x1B[2J\x1B[1;1H");
|
||||
anime_list.iter().for_each(|anime| {
|
||||
|
||||
@@ -9,5 +9,4 @@ pub fn open_video(link: (String, String)) {
|
||||
.expect("failed to open mpv");
|
||||
|
||||
// clear terminal
|
||||
print!("\x1b[2J\x1b[1;1H");
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ pub fn get_ep_location(url: &str) -> String {
|
||||
location.to_str().unwrap().to_string()
|
||||
}
|
||||
|
||||
pub fn anime_names(query: &str) -> Vec<String> {
|
||||
pub fn anime_names(query: String) -> Vec<String> {
|
||||
let url = format!("https://gogoanime.lu//search.html?keyword={}", query);
|
||||
//relpace all spaces with %20
|
||||
let url = url.replace(' ', "%20");
|
||||
|
||||
Reference in New Issue
Block a user