diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-12-11 01:20:17 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-12-11 01:20:17 +0100 |
| commit | 6e5f6d9b9c6fedb4ab80190c156595d321d33bbf (patch) | |
| tree | b6c2140e744fc3018ad08975afefad40386ebbc6 /import/src/plugins/mod.rs | |
| parent | e4f865e9da9d6660399e22a6fbeb5b84a749b07a (diff) | |
| download | jellything-6e5f6d9b9c6fedb4ab80190c156595d321d33bbf.tar jellything-6e5f6d9b9c6fedb4ab80190c156595d321d33bbf.tar.bz2 jellything-6e5f6d9b9c6fedb4ab80190c156595d321d33bbf.tar.zst | |
refactor import plugins part 3
Diffstat (limited to 'import/src/plugins/mod.rs')
| -rw-r--r-- | import/src/plugins/mod.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/import/src/plugins/mod.rs b/import/src/plugins/mod.rs index a5cc3dc..cf0da1c 100644 --- a/import/src/plugins/mod.rs +++ b/import/src/plugins/mod.rs @@ -15,6 +15,7 @@ pub mod vgmdb; pub mod wikidata; pub mod wikimedia_commons; +use crate::{ApiSecrets, InheritedFlags}; use anyhow::Result; use jellycommon::NodeID; use jellydb::Database; @@ -22,20 +23,19 @@ use jellyremuxer::matroska::Segment; use std::path::Path; use tokio::runtime::Handle; -use crate::ApiSecrets; - -pub struct ImportContext { - pub db: Database, - pub rt: Handle, +pub struct ImportContext<'a> { + pub db: &'a Database, + pub rt: &'a Handle, + pub iflags: InheritedFlags, } #[derive(Default, Clone, Copy)] pub struct PluginInfo { - name: &'static str, - handle_file: bool, - handle_media: bool, - handle_instruction: bool, - handle_process: bool, + pub name: &'static str, + pub handle_file: bool, + pub handle_media: bool, + pub handle_instruction: bool, + pub handle_process: bool, } pub trait ImportPlugin: Send + Sync { |