summaryrefslogtreecommitdiff
path: root/src/files.rs
diff options
context:
space:
mode:
authorjakka <jakkadoujin@gmail.com>2025-07-01 13:50:09 +0300
committerjakka <jakkadoujin@gmail.com>2025-07-01 13:50:09 +0300
commit36b16f9b4847bdbef15cacc9e1223cc6e336f54f (patch)
tree8bd5e7df9191543acc5c1d7c1b0c9174126bb134 /src/files.rs
parent2ac8079fc38202f04856debe5655635a4368d6df (diff)
moved to claxon
Diffstat (limited to 'src/files.rs')
-rw-r--r--src/files.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/files.rs b/src/files.rs
index 8053da2..f9352d3 100644
--- a/src/files.rs
+++ b/src/files.rs
@@ -13,7 +13,7 @@ use tokio::task::JoinSet;
use tokio_util::sync::CancellationToken;
use walkdir::WalkDir;
-use crate::{db::Database, flac::encode_file};
+use crate::{db::Database, flac::handle_encode};
#[cfg(not(test))]
const BAR_TEMPLATE: &str = "{msg:<} [{wide_bar:.green/cyan}] Elapsed: {elapsed} {pos:>7}/{len:7}";
@@ -169,7 +169,7 @@ pub async fn reencode_files(conn: &Database, canceltoken: CancellationToken) ->
Ok(())
}
res = async {
- if let Err(error) = tokio::task::spawn_blocking(move || encode_file(file)).await? {
+ if let Err(error) = tokio::task::spawn_blocking(move || handle_encode(file)).await? {
let _ = std::fs::remove_file(filename.with_extension("tmp.metadata_edit"));
let _ = std::fs::remove_file(filename.with_extension("tmp"));
return Err(anyhow!(FileError::new(&filename, error)));