fix: don't allow invalid search types
This commit is contained in:
parent
b262ced09e
commit
fe659ae88a
|
@ -137,6 +137,11 @@ async fn download_torrent_files(args: Config) {
|
|||
return;
|
||||
}
|
||||
|
||||
if search_type != "anime" && search_type != "music" {
|
||||
eprintln!("[ERROR] invalid search_type, please select `anime` or `music`");
|
||||
return;
|
||||
}
|
||||
|
||||
let filename_regex = Regex::new(r"Filename=.(?P<filename>.*).").unwrap();
|
||||
let sleep_time = Duration::from_millis(100);
|
||||
|
||||
|
|
Loading…
Reference in a new issue