From 5caa8da066a650bc55299b849263bdd0fbd2c5e4 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 22 Feb 2026 12:29:15 +0100 Subject: fix jellytool build --- Cargo.lock | 1 + tool/Cargo.toml | 1 + tool/src/add.rs | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a80b6a4..1ee2c06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2106,6 +2106,7 @@ dependencies = [ "jellycache", "jellycommon", "jellyimport", + "jellykv", "log", "rand 0.10.0", "reqwest", diff --git a/tool/Cargo.toml b/tool/Cargo.toml index 02b05a4..22374b6 100644 --- a/tool/Cargo.toml +++ b/tool/Cargo.toml @@ -7,6 +7,7 @@ edition = "2024" jellycommon = { path = "../common" } jellyimport = { path = "../import" } jellycache = { path = "../cache" } +jellykv = { path = "../kv" } log = { workspace = true } env_logger = "0.11.9" diff --git a/tool/src/add.rs b/tool/src/add.rs index cd41bef..fc88e49 100644 --- a/tool/src/add.rs +++ b/tool/src/add.rs @@ -5,6 +5,7 @@ */ use crate::cli::Action; use dialoguer::{Confirm, FuzzySelect, Input, theme::ColorfulTheme}; +use jellycache::Cache; use jellyimport::plugins::trakt::{Trakt, TraktKind}; use log::warn; use std::{ @@ -17,7 +18,7 @@ use std::{ use tokio::runtime::Handle; pub fn add(action: Action, rt: &Handle) -> anyhow::Result<()> { - init_cache_dummy()?; + let cache = Cache::new(Box::new(jellykv::dummy::Dummy), 0); match action { Action::Add { media } => { let theme = ColorfulTheme::default(); @@ -36,7 +37,7 @@ pub fn add(action: Action, rt: &Handle) -> anyhow::Result<()> { .unwrap(); let trakt = Trakt::new(&var("TRAKT_API_KEY").unwrap()); - let results = trakt.search(search_kinds, &name, rt)?; + let results = trakt.search(&cache, search_kinds, &name, rt)?; if results.is_empty() { warn!("no search results"); -- cgit v1.3