Cleanup
All checks were successful
Rust Build / Check (pull_request) Successful in 37s
Rust Build / Test Suite (pull_request) Successful in 41s
Rust Build / Rustfmt (pull_request) Successful in 33s
Rust Build / Clippy (pull_request) Successful in 45s
Rust Build / build (pull_request) Successful in 45s
All checks were successful
Rust Build / Check (pull_request) Successful in 37s
Rust Build / Test Suite (pull_request) Successful in 41s
Rust Build / Rustfmt (pull_request) Successful in 33s
Rust Build / Clippy (pull_request) Successful in 45s
Rust Build / build (pull_request) Successful in 45s
This commit is contained in:
44
src/meta.rs
44
src/meta.rs
@@ -39,7 +39,6 @@ pub mod coverart {
|
||||
Ok(info) => {
|
||||
flac_file.set_picture(0, pic.clone(), info);
|
||||
Ok(pic.into_data())
|
||||
// Ok(Vec::new())
|
||||
}
|
||||
Err(err) => Err(std::io::Error::new(
|
||||
std::io::ErrorKind::InvalidData,
|
||||
@@ -52,21 +51,6 @@ pub mod coverart {
|
||||
err.to_string(),
|
||||
)),
|
||||
}
|
||||
|
||||
/*
|
||||
let mut bytes: Vec<u8> = Vec::new();
|
||||
lofty::picture::Picture::from_flac_bytes(bytes, false, lofty::config::ParsingMode::BestAttempt);
|
||||
flac_file.set_picture(0, picture, info);
|
||||
|
||||
let pictures = flac_file.pictures();
|
||||
let res = pictures.to_vec();
|
||||
if !res.is_empty() {
|
||||
let picture = &res[0];
|
||||
Ok(picture.clone().0.into_data())
|
||||
} else {
|
||||
Ok(Vec::new())
|
||||
}
|
||||
*/
|
||||
}
|
||||
Err(err) => Err(std::io::Error::new(
|
||||
std::io::ErrorKind::InvalidData,
|
||||
@@ -903,8 +887,6 @@ mod tests {
|
||||
|
||||
let temp_file = tempfile::tempdir().expect("Could not create test directory");
|
||||
let test_dir = String::from(temp_file.path().to_str().unwrap());
|
||||
// let test_filename = String::from("track08.flac");
|
||||
// let new_filepath = test_dir.clone() + "/" + &test_filename;
|
||||
|
||||
match file_exists(&dir, &filename) {
|
||||
Ok(_) => {
|
||||
@@ -941,10 +923,6 @@ mod tests {
|
||||
let filename = util::get_filename(1);
|
||||
let dir = String::from(util::TESTFILEDIRECTORY);
|
||||
|
||||
let temp_file = tempfile::tempdir().expect("Could not create test directory");
|
||||
let test_dir = String::from(temp_file.path().to_str().unwrap());
|
||||
// let test_filename = String::from("track08.flac");
|
||||
// let new_filepath = test_dir.clone() + "/" + &test_filename;
|
||||
let new_coverart = String::from("Sample Tracks 3 - Other one.png");
|
||||
let new_cover_art_path = get_full_path(&dir, &new_coverart).unwrap();
|
||||
|
||||
@@ -960,28 +938,6 @@ mod tests {
|
||||
assert!(false, "Error: {:?}", err);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
match coverart::get_coverart(&filepath) {
|
||||
Ok(coverart) => {
|
||||
let is_empty = coverart.is_empty();
|
||||
assert_eq!(is_empty, false, "Should not be empty");
|
||||
|
||||
let mut new_coverart_path: String = test_dir.clone();
|
||||
new_coverart_path += &String::from("/newcovvv.png");
|
||||
let _ = util::save_bytes_to_file(&coverart, &new_coverart_path);
|
||||
let created_file = std::path::Path::new(&new_coverart_path);
|
||||
assert!(
|
||||
created_file.exists(),
|
||||
"Error: {:?} has not been created",
|
||||
new_coverart_path
|
||||
);
|
||||
}
|
||||
Err(err) => {
|
||||
assert!(false, "Error: {:?}", err.to_string());
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
Err(err) => {
|
||||
assert!(false, "Error: File does not exist {:?}", err.to_string());
|
||||
|
Reference in New Issue
Block a user