diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-02-21 03:46:30 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-02-21 03:46:30 +0100 |
| commit | 356bc5fe6913e85b18a2cb355f30019cdfd6b146 (patch) | |
| tree | b6d2ea73498c04d740291c8670fff1ec81d1a886 /import/src/plugins/trakt.rs | |
| parent | a7e9d52efd1dba23a43f13d0eb9bb2236d1de74c (diff) | |
| download | jellything-356bc5fe6913e85b18a2cb355f30019cdfd6b146.tar jellything-356bc5fe6913e85b18a2cb355f30019cdfd6b146.tar.bz2 jellything-356bc5fe6913e85b18a2cb355f30019cdfd6b146.tar.zst | |
Also use source ranks for nested attributes
Diffstat (limited to 'import/src/plugins/trakt.rs')
| -rw-r--r-- | import/src/plugins/trakt.rs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/import/src/plugins/trakt.rs b/import/src/plugins/trakt.rs index cc3b119..bb4a1b0 100644 --- a/import/src/plugins/trakt.rs +++ b/import/src/plugins/trakt.rs @@ -483,13 +483,13 @@ impl Trakt { node = node.as_object().insert_s(ct.is, NO_TAGLINE, &tagline); } if let Some(x) = details.ids.imdb.clone() { - node = node - .as_object() - .update(NO_IDENTIFIERS, |idents| idents.insert(IDENT_IMDB, &x)); + node = node.as_object().update(NO_IDENTIFIERS, |idents| { + idents.insert_s(ct.is, IDENT_IMDB, &x) + }); } if let Some(x) = details.ids.tvdb.clone() { node = node.as_object().update(NO_IDENTIFIERS, |idents| { - idents.insert(IDENT_TVDB, &x.to_string()) + idents.insert_s(ct.is, IDENT_TVDB, &x.to_string()) }); } if let Some(x) = details.ids.tmdb.clone() { @@ -530,12 +530,14 @@ impl Trakt { c = c.as_object().update(NO_IDENTIFIERS, |ids| { let mut ids = ids.insert(IDENT_TRAKT_PERSON, &traktid.to_string()); if let Some(tmdbid) = ap.person.ids.tmdb { - ids = ids - .as_object() - .insert(IDENT_TMDB_PERSON, &tmdbid.to_string()); + ids = ids.as_object().insert_s( + ct.is, + IDENT_TMDB_PERSON, + &tmdbid.to_string(), + ); } if let Some(imdbid) = &ap.person.ids.imdb { - ids = ids.as_object().insert(IDENT_IMDB_PERSON, imdbid); + ids = ids.as_object().insert_s(ct.is, IDENT_IMDB_PERSON, imdbid); } ids }); @@ -604,7 +606,7 @@ impl Trakt { if let Some(r) = episode.rating { node = node .as_object() - .update(NO_RATINGS, |rats| rats.insert(RTYP_TRAKT, r)); + .update(NO_RATINGS, |rats| rats.insert_s(ct.is, RTYP_TRAKT, r)); } node })?; |