aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/ui/assets.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/routes/ui/assets.rs')
-rw-r--r--server/src/routes/ui/assets.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/routes/ui/assets.rs b/server/src/routes/ui/assets.rs
index cfaa68e..c661771 100644
--- a/server/src/routes/ui/assets.rs
+++ b/server/src/routes/ui/assets.rs
@@ -31,7 +31,7 @@ pub async fn r_asset(
let session = fed.get_session(&host).await?;
let asset = base64::engine::general_purpose::URL_SAFE.encode(asset);
- async_cache_file(&["fed-asset", &asset], |out| async {
+ async_cache_file("fed-asset", &asset, |out| async {
session.asset(out, &asset, width).await
})
.await?
@@ -40,7 +40,7 @@ pub async fn r_asset(
// fit the resolution into a finite set so the maximum cache is finite too.
let width = 2usize.pow(width.clamp(128, 2048).ilog2());
- jellytranscoder::image::transcode(source, AVIF_QUALITY, AVIF_SPEED, width)
+ jellytranscoder::image::transcode(&source, AVIF_QUALITY, AVIF_SPEED, width)
.await
.context("transcoding asset")?
};
@@ -186,7 +186,7 @@ pub async fn r_node_thumbnail(
)
.await?;
- async_cache_file(&["fed-thumb", &format!("{id} {t}")], |out| {
+ async_cache_file("fed-thumb", (id, t as i64), |out| {
session.node_thumbnail(out, id.into(), 2048, t)
})
.await?