aboutsummaryrefslogtreecommitdiff
path: root/import
diff options
context:
space:
mode:
Diffstat (limited to 'import')
-rw-r--r--import/src/lib.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/import/src/lib.rs b/import/src/lib.rs
index 9a099a8..1c04437 100644
--- a/import/src/lib.rs
+++ b/import/src/lib.rs
@@ -286,7 +286,15 @@ async fn process_source(
Ok(())
};
match s {
- ImportSource::Override(n) => insert_node(&id, n)?,
+ ImportSource::Override(mut n) => {
+ if let Some(backdrop) = n.private.backdrop.clone() {
+ n.public.backdrop = Some(AssetInner::Assets(backdrop).ser());
+ }
+ if let Some(poster) = n.private.poster.clone() {
+ n.public.poster = Some(AssetInner::Assets(poster).ser());
+ }
+ insert_node(&id, n)?
+ }
ImportSource::Trakt { id: tid, kind } => {
info!("trakt {id}");
let trakt = ap
@@ -641,6 +649,8 @@ fn merge_node(x: Node, y: Node) -> anyhow::Result<Node> {
private: NodePrivate {
id: x.private.id.or(y.private.id),
source,
+ backdrop: None,
+ poster: None,
},
})
}
@@ -763,6 +773,8 @@ async fn import_remote(
let mut node = Node {
public: node.clone(),
private: NodePrivate {
+ backdrop: None,
+ poster: None,
id: None,
source: track_sources,
},