mirror of
https://github.com/SinTan1729/movie-rename.git
synced 2024-12-25 11:48:37 -06:00
fix: Gracefully exit after user cancellation
This commit is contained in:
parent
02fea4a71c
commit
4d04f51251
1 changed files with 8 additions and 2 deletions
|
@ -95,12 +95,18 @@ pub async fn process_file(
|
|||
}
|
||||
|
||||
// Choose from the possible entries
|
||||
let choice = Select::new(
|
||||
let choice = match Select::new(
|
||||
format!(" Possible choices for {}:", file_base).as_str(),
|
||||
movie_list,
|
||||
)
|
||||
.prompt()
|
||||
.expect(" Invalid choice!");
|
||||
{
|
||||
Ok(movie) => movie,
|
||||
Err(error) => {
|
||||
println!(" {error}");
|
||||
return ("".to_string(), true);
|
||||
}
|
||||
};
|
||||
|
||||
// Handle the case for subtitle files
|
||||
let mut is_subtitle = false;
|
||||
|
|
Loading…
Reference in a new issue