pinakes-core: remove extracted modules; trim to storage/scan/scheduler domain

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ibdce07d2626c1a9541eeed26a17716b46a6a6964
This commit is contained in:
raf 2026-05-20 21:52:08 +03:00
commit 011e8edb28
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
45 changed files with 2169 additions and 10844 deletions

View file

@ -18,17 +18,10 @@ use std::{
time::{Duration, Instant},
};
use rustc_hash::FxHashMap;
use tokio::sync::RwLock;
use tracing::{debug, info, warn};
use super::PluginManager;
use crate::{
config::PluginTimeoutConfig,
media_type::MediaType,
metadata::ExtractedMetadata,
model::MediaId,
plugin::rpc::{
use pinakes_metadata::ExtractedMetadata;
use pinakes_plugin::{
PluginManager,
rpc::{
CanHandleRequest,
CanHandleResponse,
ExtractMetadataRequest,
@ -46,6 +39,12 @@ use crate::{
SearchResultItem,
},
};
use pinakes_types::config::PluginTimeoutConfig;
use rustc_hash::FxHashMap;
use tokio::sync::RwLock;
use tracing::{debug, info, warn};
use crate::{media_type::MediaType, model::MediaId};
/// Built-in handlers run at this implicit priority.
const BUILTIN_PRIORITY: u16 = 100;
@ -529,7 +528,7 @@ impl PluginPipeline {
let path = path.to_path_buf();
let mt = media_type.clone();
let builtin = tokio::task::spawn_blocking(move || {
crate::metadata::extract_metadata(&path, &mt)
pinakes_metadata::extract_metadata(&path, &mt)
})
.await
.map_err(|e| {
@ -1174,10 +1173,10 @@ fn merge_extracted(base: &mut ExtractedMetadata, source: ExtractedMetadata) {
#[cfg(test)]
mod tests {
use pinakes_plugin::{PluginManager, PluginManagerConfig};
use tempfile::TempDir;
use super::*;
use crate::plugin::{PluginManager, PluginManagerConfig};
/// Create a `PluginPipeline` backed by an empty `PluginManager`.
fn create_test_pipeline() -> (TempDir, Arc<PluginPipeline>) {