From b2e88a8beabf04adc28947cf82996e8692a68b71 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 24 Jan 2026 04:31:48 +0100 Subject: move things around; kv crate --- import/src/plugins/misc.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'import/src/plugins/misc.rs') diff --git a/import/src/plugins/misc.rs b/import/src/plugins/misc.rs index ff08d87..babbcec 100644 --- a/import/src/plugins/misc.rs +++ b/import/src/plugins/misc.rs @@ -3,7 +3,7 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2026 metamuffin */ -use crate::plugins::{ImportContext, ImportPlugin, PluginInfo}; +use crate::plugins::{PluginContext, ImportPlugin, PluginInfo}; use anyhow::{Context, Result, bail}; use jellycache::{HashKey, cache_store}; use jellycommon::{jellyobject::inspect::Inspector, *}; @@ -22,7 +22,7 @@ impl ImportPlugin for ImageFiles { ..Default::default() } } - fn file(&self, ct: &ImportContext, row: RowNum, path: &Path) -> Result<()> { + fn file(&self, ct: &PluginContext, row: RowNum, path: &Path) -> Result<()> { let filename = path.file_name().unwrap().to_string_lossy(); let slot = match filename.as_ref() { "poster.jpeg" | "poster.webp" | "poster.png" => PICT_COVER, @@ -66,7 +66,7 @@ impl ImportPlugin for ImageAttachments { ..Default::default() } } - fn media(&self, ct: &ImportContext, row: RowNum, _path: &Path, seg: &Segment) -> Result<()> { + fn media(&self, ct: &PluginContext, row: RowNum, _path: &Path, seg: &Segment) -> Result<()> { let Some(cover) = seg .attachments .iter() @@ -94,7 +94,7 @@ impl ImportPlugin for General { ..Default::default() } } - fn instruction(&self, ct: &ImportContext, node: RowNum, line: &str) -> Result<()> { + fn instruction(&self, ct: &PluginContext, node: RowNum, line: &str) -> Result<()> { if line == "hidden" { ct.dba.update_node(node, |node| { node.as_object().insert(NO_VISIBILITY, VISI_HIDDEN) @@ -144,7 +144,7 @@ impl ImportPlugin for Children { ..Default::default() } } - fn file(&self, ct: &ImportContext, parent: RowNum, path: &Path) -> Result<()> { + fn file(&self, ct: &PluginContext, parent: RowNum, path: &Path) -> Result<()> { // TODO use idents // let filename = path.file_name().unwrap().to_string_lossy(); // if filename.as_ref() == "children" { @@ -176,7 +176,7 @@ impl ImportPlugin for EpisodeIndex { ..Default::default() } } - fn media(&self, ct: &ImportContext, node: RowNum, path: &Path, _seg: &Segment) -> Result<()> { + fn media(&self, ct: &PluginContext, node: RowNum, path: &Path, _seg: &Segment) -> Result<()> { let filename = path.file_name().unwrap().to_string_lossy(); if let Some(cap) = RE_EPISODE_FILENAME.captures(&filename) { if let Some(episode) = cap.name("episode").map(|m| m.as_str()) { -- cgit v1.3