aboutsummaryrefslogtreecommitdiff
path: root/stream/src/cues.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stream/src/cues.rs')
-rw-r--r--stream/src/cues.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/stream/src/cues.rs b/stream/src/cues.rs
index fbcb341..2fd4d70 100644
--- a/stream/src/cues.rs
+++ b/stream/src/cues.rs
@@ -4,8 +4,8 @@
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;
use serde::{Deserialize, Serialize};
use std::{collections::BTreeMap, fs::File, path::Path, sync::Arc};
@@ -28,8 +28,8 @@ pub struct StatsAndCues {
pub cues: Vec<GeneratedCue>,
}
-pub fn generate_cues(path: &Path) -> Result<Arc<StatsAndCues>> {
- cache_memory(
+pub fn generate_cues(cache: &Cache, path: &Path) -> Result<Arc<StatsAndCues>> {
+ cache.cache_memory(
&format!("media/generated-cues/{}.json", HashKey(path)),
move || {
let media = File::open(path)?;