diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-11-30 12:32:44 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-11-30 12:32:44 +0100 |
| commit | 8174d129fbabd2d39323678d11d868893ddb429a (patch) | |
| tree | 7979a528114cd5fb827f748f678a916e8e8eeddc /stream/src/metadata.rs | |
| parent | 5db15c323d76dca9ae71b0204d63dcb09fbbcbc5 (diff) | |
| download | jellything-8174d129fbabd2d39323678d11d868893ddb429a.tar jellything-8174d129fbabd2d39323678d11d868893ddb429a.tar.bz2 jellything-8174d129fbabd2d39323678d11d868893ddb429a.tar.zst | |
new sync cache
Diffstat (limited to 'stream/src/metadata.rs')
| -rw-r--r-- | stream/src/metadata.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stream/src/metadata.rs b/stream/src/metadata.rs index 9bfa3aa..fe553e2 100644 --- a/stream/src/metadata.rs +++ b/stream/src/metadata.rs @@ -5,12 +5,12 @@ */ use anyhow::{anyhow, Result}; -use jellycache::cache_memory; +use jellycache::{cache_memory, CacheKey}; 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("mkmeta-v4", path, move || { + cache_memory(CacheKey::new_json(("media-metadata", path)), move || { let media = File::open(path)?; let mut media = create_demuxer_autodetect(Box::new(media))?.ok_or(anyhow!("media format unknown"))?; |