diff options
Diffstat (limited to 'server/src/routes/ui/assets.rs')
-rw-r--r-- | server/src/routes/ui/assets.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/src/routes/ui/assets.rs b/server/src/routes/ui/assets.rs index d5d2839..7973b0c 100644 --- a/server/src/routes/ui/assets.rs +++ b/server/src/routes/ui/assets.rs @@ -19,7 +19,6 @@ pub use jellycommon::AssetRole; use jellycommon::{AssetLocation, LocalTrack, PeopleGroup, SourceTrackKind, TrackSource}; use log::info; use rocket::{get, http::ContentType, State}; -use tokio::fs::File; #[get("/n/<id>/asset?<role>&<width>")] pub async fn r_item_assets( @@ -152,6 +151,6 @@ async fn asset_with_res( info!("loading asset from {path:?}"); Ok(( ContentType::AVIF, - CacheControlFile::new(File::open(path.path()).await.context("opening file")?).await, + CacheControlFile::new_cachekey(&path.path()).await?, )) } |