aboutsummaryrefslogtreecommitdiff
path: root/import/src/plugins/tmdb.rs
diff options
context:
space:
mode:
Diffstat (limited to 'import/src/plugins/tmdb.rs')
-rw-r--r--import/src/plugins/tmdb.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/import/src/plugins/tmdb.rs b/import/src/plugins/tmdb.rs
index ce9ae59..206781b 100644
--- a/import/src/plugins/tmdb.rs
+++ b/import/src/plugins/tmdb.rs
@@ -4,11 +4,12 @@
Copyright (C) 2026 metamuffin <metamuffin.org>
*/
use crate::{
- USER_AGENT,
+ NodeID, USER_AGENT,
plugins::{ImportContext, ImportPlugin, PluginInfo},
};
use anyhow::{Context, Result, anyhow, bail};
use jellycache::{EscapeKey, HashKey, cache_memory, cache_store};
+use jellycommon::jellyobject::Object;
use log::info;
use reqwest::{
Client, ClientBuilder,
@@ -160,14 +161,14 @@ impl ImportPlugin for Tmdb {
..Default::default()
}
}
- fn process(&self, ct: &ImportContext, node: NodeID, data: &Node) -> Result<()> {
+ fn process(&self, ct: &ImportContext, node: NodeID, data: Object) -> Result<()> {
self.process_primary(ct, node, data)?;
self.process_episode(ct, node, data)?;
Ok(())
}
}
impl Tmdb {
- fn process_primary(&self, ct: &ImportContext, node: NodeID, data: &Node) -> Result<()> {
+ fn process_primary(&self, ct: &ImportContext, node: NodeID, data: Object) -> Result<()> {
let (tmdb_kind, tmdb_id): (_, u64) =
if let Some(id) = data.identifiers.get(&IdentifierType::TmdbSeries) {
(TmdbKind::Tv, id.parse()?)
@@ -199,7 +200,7 @@ impl Tmdb {
.transpose()?
.flatten();
- ct.db.update_node_init(node, |node| {
+ ct.dba.update_node_by_nodeid(node, |node| {
node.title = details.title.clone().or(node.title.clone());
node.tagline = details.tagline.clone().or(node.tagline.clone());
node.description = Some(details.overview.clone());