feat: WIP dialog when copying non music files
This commit is contained in:
+23
@@ -57,6 +57,29 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
.is_some_and(|ext| extra_files.iter().any(|x| x == ext))
|
.is_some_and(|ext| extra_files.iter().any(|x| x == ext))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
} else {
|
||||||
|
let mut input = String::new();
|
||||||
|
|
||||||
|
eprintln!("Found files that aren't music files: {}", path.display());
|
||||||
|
eprintln!(" [1] Copy all files");
|
||||||
|
eprintln!(" [2] Skip non-music files");
|
||||||
|
eprintln!(" [3] Cancel import");
|
||||||
|
|
||||||
|
eprint!("> ");
|
||||||
|
io::stdin()
|
||||||
|
.read_line(&mut input)
|
||||||
|
.expect("failed to read input");
|
||||||
|
|
||||||
|
let mut other_files: Vec<PathBuf>;
|
||||||
|
match input.trim() {
|
||||||
|
"1" => {
|
||||||
|
other_files.extend(&path);
|
||||||
|
}
|
||||||
|
"2" => {}
|
||||||
|
_ => {
|
||||||
|
println!("Invalid option.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let tag = get_metadata(&path);
|
let tag = get_metadata(&path);
|
||||||
|
|||||||
Reference in New Issue
Block a user