summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/files.rs8
-rw-r--r--src/flac.rs2
2 files changed, 3 insertions, 7 deletions
diff --git a/src/files.rs b/src/files.rs
index 4e09378..7413801 100644
--- a/src/files.rs
+++ b/src/files.rs
@@ -60,16 +60,12 @@ fn handle_file(file: impl AsRef<Path>, conn: &Connection) -> Result<()> {
.as_secs();
let db_modtime = conn.get_modtime(&file)?;
if modtime != db_modtime {
- if let Err(error) = conn.update_file(&file) {
- return Err(FileError::new(&file, error).into());
- };
+ conn.update_file(&file)?;
}
return Ok(());
}
- if let Err(error) = conn.insert_file(&file) {
- return Err(FileError::new(file, error).into());
- }
+ conn.insert_file(&file)?;
Ok(())
}
diff --git a/src/flac.rs b/src/flac.rs
index 0879faa..c08ec6c 100644
--- a/src/flac.rs
+++ b/src/flac.rs
@@ -27,7 +27,7 @@ fn write_tags(filename: impl AsRef<Path>, hash: Vec<u8>) -> Result<()> {
match block {
Block::VorbisComment(comment) => {
for (key, val) in comment.comments.clone() {
- if key != "ENCODER" {
+ if key.to_lowercase() != "encoder" || key.to_lowercase() != "encoded by" {
output.set_vorbis(key, val);
}
}