diff options
Diffstat (limited to 'import/src/plugins/misc.rs')
| -rw-r--r-- | import/src/plugins/misc.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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 <metamuffin.org> */ -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()) { |