diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-12-11 17:30:14 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-12-11 17:30:14 +0100 |
| commit | 7c716587f65db79a59886d9696627765f965b18b (patch) | |
| tree | a731d8b505adac6a6f36d69cf68cbf6b70d0bf0f /import/src/plugins/mod.rs | |
| parent | ace558bb6429c3b1f913ed54858720fc00a8e919 (diff) | |
| download | jellything-7c716587f65db79a59886d9696627765f965b18b.tar jellything-7c716587f65db79a59886d9696627765f965b18b.tar.bz2 jellything-7c716587f65db79a59886d9696627765f965b18b.tar.zst | |
add import process stage; migrate trakt to plugin
Diffstat (limited to 'import/src/plugins/mod.rs')
| -rw-r--r-- | import/src/plugins/mod.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/import/src/plugins/mod.rs b/import/src/plugins/mod.rs index d4e49b5..a294b9c 100644 --- a/import/src/plugins/mod.rs +++ b/import/src/plugins/mod.rs @@ -17,16 +17,17 @@ pub mod wikimedia_commons; use crate::{ApiSecrets, InheritedFlags}; use anyhow::Result; -use jellycommon::NodeID; +use jellycommon::{Node, NodeID}; use jellydb::Database; use jellyremuxer::matroska::Segment; -use std::path::Path; +use std::{collections::HashSet, path::Path, sync::Mutex}; use tokio::runtime::Handle; pub struct ImportContext<'a> { pub db: &'a Database, pub rt: &'a Handle, pub iflags: InheritedFlags, + pub nodes: &'a Mutex<HashSet<NodeID>>, } #[derive(Default, Clone, Copy)] @@ -52,8 +53,8 @@ pub trait ImportPlugin: Send + Sync { let _ = (ct, node, line); Ok(()) } - fn process(&self, ct: &ImportContext, node: NodeID) -> Result<()> { - let _ = (ct, node); + fn process(&self, ct: &ImportContext, node: NodeID, data: &Node) -> Result<()> { + let _ = (ct, node, data); Ok(()) } } |