aboutsummaryrefslogtreecommitdiff
path: root/import/src/plugins/omdb.rs
diff options
context:
space:
mode:
Diffstat (limited to 'import/src/plugins/omdb.rs')
-rw-r--r--import/src/plugins/omdb.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/import/src/plugins/omdb.rs b/import/src/plugins/omdb.rs
index bb58c6b..20fb933 100644
--- a/import/src/plugins/omdb.rs
+++ b/import/src/plugins/omdb.rs
@@ -9,7 +9,8 @@ use std::sync::Arc;
use anyhow::{Context, Result, anyhow};
use jellycache::Cache;
use jellycommon::{
- IDENT_IMDB, NO_IDENTIFIERS, NO_RATINGS, RTYP_IMDB, RTYP_METACRITIC, RTYP_ROTTEN_TOMATOES,
+ IDENT_IMDB, MSOURCE_OMDB, NO_DESCRIPTION, NO_IDENTIFIERS, NO_RATINGS, NO_TITLE, RTYP_IMDB,
+ RTYP_METACRITIC, RTYP_ROTTEN_TOMATOES,
};
use jellydb::RowNum;
use log::info;
@@ -23,6 +24,7 @@ use tokio::runtime::Handle;
use crate::{
USER_AGENT,
plugins::{ImportPlugin, PluginContext, PluginInfo},
+ source_rank::ObjectImportSourceExt,
};
pub struct Omdb {
@@ -115,6 +117,7 @@ impl ImportPlugin for Omdb {
fn info(&self) -> PluginInfo {
PluginInfo {
name: "omdb",
+ tag: MSOURCE_OMDB,
handle_process: true,
..Default::default()
}
@@ -151,6 +154,11 @@ impl ImportPlugin for Omdb {
.transpose()?;
ct.ic.update_node(node, |mut node| {
+ node = node.as_object().insert_s(ct.is, NO_TITLE, &entry.title);
+ node = node
+ .as_object()
+ .insert_s(ct.is, NO_DESCRIPTION, &entry.plot);
+
for (typ, val) in [
(RTYP_METACRITIC, metascore),
(RTYP_IMDB, imdb),