From c836b650eaf4ba33b1cfd2b475971b3ccc9f69b7 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 15 Jan 2026 02:57:31 +0100 Subject: new update_node_init --- import/src/plugins/mod.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'import/src/plugins/mod.rs') diff --git a/import/src/plugins/mod.rs b/import/src/plugins/mod.rs index 3aeefdf..095fd39 100644 --- a/import/src/plugins/mod.rs +++ b/import/src/plugins/mod.rs @@ -15,19 +15,20 @@ pub mod vgmdb; pub mod wikidata; pub mod wikimedia_commons; -use crate::{ApiSecrets, InheritedFlags}; +use crate::{ApiSecrets, DatabaseTables, InheritedFlags}; use anyhow::Result; -use jellycommon::{Node, NodeID}; -use jellydb::Database; +use jellycommon::jellyobject::Object; +use jellydb::table::{RowNum, Table}; use jellyremuxer::matroska::Segment; use std::{collections::HashSet, path::Path, sync::Mutex}; use tokio::runtime::Handle; pub struct ImportContext<'a> { - pub db: &'a Database, + pub dba: DatabaseTables, + pub nodes: &'a Table, pub rt: &'a Handle, pub iflags: InheritedFlags, - pub nodes: &'a Mutex>, + pub pending_nodes: &'a Mutex>, } #[derive(Default, Clone, Copy)] @@ -41,19 +42,19 @@ pub struct PluginInfo { pub trait ImportPlugin: Send + Sync { fn info(&self) -> PluginInfo; - fn file(&self, ct: &ImportContext, parent: NodeID, path: &Path) -> Result<()> { + fn file(&self, ct: &ImportContext, parent: RowNum, path: &Path) -> Result<()> { let _ = (ct, parent, path); Ok(()) } - fn media(&self, ct: &ImportContext, node: NodeID, path: &Path, seg: &Segment) -> Result<()> { + fn media(&self, ct: &ImportContext, node: RowNum, path: &Path, seg: &Segment) -> Result<()> { let _ = (ct, node, path, seg); Ok(()) } - fn instruction(&self, ct: &ImportContext, node: NodeID, line: &str) -> Result<()> { + fn instruction(&self, ct: &ImportContext, node: RowNum, line: &str) -> Result<()> { let _ = (ct, node, line); Ok(()) } - fn process(&self, ct: &ImportContext, node: NodeID, data: &Node) -> Result<()> { + fn process(&self, ct: &ImportContext, node: RowNum, data: Object<'_>) -> Result<()> { let _ = (ct, node, data); Ok(()) } -- cgit v1.3