feat: handle multiple files in edit (WIP)
This commit is contained in:
+4
-4
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user