From 2bcccb18a6cb8bf836f57c3d86f759b19699def2 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 24 Jan 2026 23:06:33 +0100 Subject: cache as object --- import/src/plugins/infojson.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'import/src/plugins/infojson.rs') diff --git a/import/src/plugins/infojson.rs b/import/src/plugins/infojson.rs index d62983d..3426679 100644 --- a/import/src/plugins/infojson.rs +++ b/import/src/plugins/infojson.rs @@ -3,16 +3,10 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2026 metamuffin */ -use crate::plugins::{PluginContext, ImportPlugin, PluginInfo}; +use crate::plugins::{ImportPlugin, PluginContext, PluginInfo}; use anyhow::{Context, Result, anyhow}; use chrono::{Utc, format::Parsed}; -use jellycache::cache_read; -use jellycommon::{ - IDENT_BANDCAMP, IDENT_YOUTUBE_CHANNEL, IDENT_YOUTUBE_CHANNEL_HANDLE, IDENT_YOUTUBE_VIDEO, - KIND_CHANNEL, KIND_MUSIC, KIND_SHORTFORMVIDEO, KIND_VIDEO, NO_DESCRIPTION, NO_IDENTIFIERS, - NO_KIND, NO_RATINGS, NO_RELEASEDATE, NO_SUBTITLE, NO_TAG, NO_TITLE, RTYP_YOUTUBE_FOLLOWERS, - RTYP_YOUTUBE_LIKES, RTYP_YOUTUBE_VIEWS, -}; +use jellycommon::*; use jellydb::table::RowNum; use jellyremuxer::matroska::{AttachedFile, Segment}; use log::info; @@ -215,7 +209,10 @@ impl ImportPlugin for Infojson { .flat_map(|a| &a.files) .find(is_info_json) .map(|att| { - let data = cache_read(str::from_utf8(&att.data).unwrap())? + let data = ct + .dba + .cache + .read(str::from_utf8(&att.data).unwrap())? .ok_or(anyhow!("info json cache missing"))?; anyhow::Ok(serde_json::from_slice::(&data)?) }) -- cgit v1.3