From 63454aa9bd9fd4ee293c316e7ca15c88e6c5ca2a Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 24 Sep 2023 22:41:56 +0200 Subject: fix federated assets (doesnt work bc dav1d-sys) --- transcoder/Cargo.toml | 1 + transcoder/src/image.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'transcoder') diff --git a/transcoder/Cargo.toml b/transcoder/Cargo.toml index 36f44af..9b533a6 100644 --- a/transcoder/Cargo.toml +++ b/transcoder/Cargo.toml @@ -8,6 +8,7 @@ jellycommon = { path = "../common" } jellybase = { path = "../base" } log = "0.4.20" image = "0.24.7" +# image = { version = "0.24.7", features = ["avif-decoder"] } anyhow = "1.0.75" rgb = "0.8.36" rav1e = { version = "0.6.6", default-features = false, features = [ diff --git a/transcoder/src/image.rs b/transcoder/src/image.rs index 273d6b4..c28ef2b 100644 --- a/transcoder/src/image.rs +++ b/transcoder/src/image.rs @@ -18,7 +18,8 @@ pub fn transcode( let path = cache_file(&[ original_path.as_os_str().to_str().unwrap(), &format!("{width} {quality} {speed}"), - ]); + ]) + .path(); if !path.exists() { info!("encoding {path:?} (speed={speed}, quality={quality}, width={width})"); let reader = image::io::Reader::new(BufReader::new(File::open(original_path)?)) -- cgit v1.2.3-70-g09d2