Set meta bug fix #27
15
src/meta.rs
15
src/meta.rs
@@ -220,9 +220,15 @@ pub mod metadata {
|
||||
}
|
||||
};
|
||||
|
||||
vb.save_to_path(filepath, lofty::config::WriteOptions::default());
|
||||
|
||||
Ok(value.to_owned())
|
||||
match vb.save_to_path(filepath, lofty::config::WriteOptions::default()) {
|
||||
Ok(res) => {
|
||||
println!("Result: {:?}", res);
|
||||
Ok(value.to_owned())
|
||||
}
|
||||
Err(err) => {
|
||||
Err(std::io::Error::new(std::io::ErrorKind::InvalidData, err.to_string()))
|
||||
}
|
||||
}
|
||||
}
|
||||
None => Err(std::io::Error::new(
|
||||
std::io::ErrorKind::InvalidData,
|
||||
@@ -582,8 +588,7 @@ mod tests {
|
||||
let dir = String::from(util::TESTFILEDIRECTORY);
|
||||
|
||||
let temp_file = tempfile::tempdir().expect("Could not create test directory");
|
||||
let mut test_dir = String::from(temp_file.path().to_str().unwrap());
|
||||
test_dir = String::from("/home/phoenix/tmp/songparser/mydata");
|
||||
let test_dir = String::from(temp_file.path().to_str().unwrap());
|
||||
let test_filename = String::from("track08.flac");
|
||||
let new_filepath = test_dir + "/" + &test_filename;
|
||||
|
||||
|
Reference in New Issue
Block a user