feat: handle multiple files in edit (WIP)

This commit is contained in:
2026-09-04 19:11:21 +02:00
parent e1e56f7e27
commit b0f8486209
2 changed files with 52 additions and 26 deletions
+4 -4
View File
@@ -78,16 +78,16 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("{:?}", item)
}
}
Commands::Edit { file } => {
let tag = get_metadata(file);
edit(file.to_path_buf(), tag)?;
Commands::Edit { files } => {
edit(files.to_path_buf(), extra_files)?;
}
}
Ok(())
}
fn get_metadata<P: AsRef<OsStr>>(file_path: P) -> lofty::tag::Tag {
pub fn get_metadata<P: AsRef<OsStr>>(file_path: P) -> lofty::tag::Tag {
let tagged_file = Probe::open(file_path.as_ref())
.expect("ERROR: Bad path provided!")
.read()