aboutsummaryrefslogtreecommitdiff
path: root/stream/src/metadata.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stream/src/metadata.rs')
-rw-r--r--stream/src/metadata.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/stream/src/metadata.rs b/stream/src/metadata.rs
index 640b851..4dedb76 100644
--- a/stream/src/metadata.rs
+++ b/stream/src/metadata.rs
@@ -4,13 +4,13 @@
Copyright (C) 2026 metamuffin <metamuffin.org>
*/
-use anyhow::{anyhow, Result};
-use jellycache::{cache_memory, HashKey};
+use anyhow::{Result, anyhow};
+use jellycache::{Cache, HashKey};
use jellyremuxer::{demuxers::create_demuxer_autodetect, matroska::Segment};
use std::{fs::File, path::Path, sync::Arc};
-pub fn read_metadata(path: &Path) -> Result<Arc<Segment>> {
- cache_memory(
+pub fn read_metadata(cache: &Cache, path: &Path) -> Result<Arc<Segment>> {
+ cache.cache_memory(
&format!("media/stream-metadata/{}.json", HashKey(path)),
move || {
let media = File::open(path)?;