From 8ec94477fb5efae62dcfee31cede87eb400bf02d Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 5 Feb 2026 21:17:54 +0100 Subject: migrate import to new db trait --- import/src/plugins/infojson.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'import/src/plugins/infojson.rs') diff --git a/import/src/plugins/infojson.rs b/import/src/plugins/infojson.rs index e03a5f7..3a48ce8 100644 --- a/import/src/plugins/infojson.rs +++ b/import/src/plugins/infojson.rs @@ -7,7 +7,7 @@ use crate::plugins::{ImportPlugin, PluginContext, PluginInfo}; use anyhow::{Context, Result, anyhow}; use chrono::{Utc, format::Parsed}; use jellycommon::*; -use jellydb::table::RowNum; +use jellydb::RowNum; use jellyremuxer::matroska::{AttachedFile, Segment}; use log::info; use serde::{Deserialize, Serialize}; @@ -176,7 +176,7 @@ impl ImportPlugin for Infojson { let title = clean_uploader_name(&data.title); ct.dba.db.transaction(&mut |txn| { - let mut node = ct.dba.nodes.get(txn, parent)?.unwrap(); + let mut node = txn.get(parent)?.unwrap(); node = node.as_object().insert(NO_KIND, KIND_CHANNEL); node = node.as_object().insert(NO_TITLE, title); if let Some(cid) = &data.channel_id { @@ -198,7 +198,7 @@ impl ImportPlugin for Infojson { }); } - ct.dba.nodes.update(txn, parent, node) + txn.update(parent, node) }) } @@ -237,7 +237,7 @@ impl ImportPlugin for Infojson { }; ct.dba.db.transaction(&mut |txn| { - let mut node = ct.dba.nodes.get(txn, row)?.unwrap(); + let mut node = txn.get(row)?.unwrap(); node = node.as_object().insert(NO_KIND, kind); node = node.as_object().insert(NO_TITLE, &infojson.title); if let Some(title) = &infojson.alt_title @@ -290,7 +290,7 @@ impl ImportPlugin for Infojson { _ => (), }; - ct.dba.nodes.update(txn, row, node) + txn.update(row, node) })?; } Ok(()) -- cgit v1.3