diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-02-20 21:02:33 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-02-20 21:02:33 +0100 |
| commit | 8b2cf84bc7a80f9a45aa350a2c98949bfed4b7c1 (patch) | |
| tree | 1611e9f7e221427cd0ff5c18da2dec87c19720de /import/src/plugins/omdb.rs | |
| parent | 5caf1f1db721d6dee2ddb5d0613e8c9914ccf879 (diff) | |
| download | jellything-8b2cf84bc7a80f9a45aa350a2c98949bfed4b7c1.tar jellything-8b2cf84bc7a80f9a45aa350a2c98949bfed4b7c1.tar.bz2 jellything-8b2cf84bc7a80f9a45aa350a2c98949bfed4b7c1.tar.zst | |
source ranks
Diffstat (limited to 'import/src/plugins/omdb.rs')
| -rw-r--r-- | import/src/plugins/omdb.rs | 10 |
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), |