aboutsummaryrefslogtreecommitdiff
path: root/common/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-30 18:34:09 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-30 18:34:09 +0100
commit9d6411fd92e73c204425f8dd37dc3cf567f604e4 (patch)
treed61d3e0b6bcd803e6ccb6d01669d40a1454ec009 /common/src/lib.rs
parentbfc5552a8eba07897c2ed626b49c085d97fdfa0d (diff)
downloadjellything-9d6411fd92e73c204425f8dd37dc3cf567f604e4.tar
jellything-9d6411fd92e73c204425f8dd37dc3cf567f604e4.tar.bz2
jellything-9d6411fd92e73c204425f8dd37dc3cf567f604e4.tar.zst
avoid transitive crate deps by re-export
Diffstat (limited to 'common/src/lib.rs')
-rw-r--r--common/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index 503febd..5dadd1c 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -25,6 +25,7 @@ pub struct NodeID(pub [u8; 32]);
#[derive(Debug, Clone, Deserialize, Serialize, Default, Encode, Decode)]
pub struct Node {
pub slug: String,
+ #[serde(default)]
pub parents: Vec<NodeID>,
pub kind: Option<NodeKind>,
pub poster: Option<Asset>,
@@ -36,9 +37,12 @@ pub struct Node {
pub release_date: Option<i64>, // in unix millis
pub index: Option<usize>,
pub media: Option<MediaInfo>,
+ #[serde(default)]
pub ratings: BTreeMap<Rating, f64>,
pub federated: Option<String>,
+ #[serde(default)]
pub people: BTreeMap<PeopleGroup, Vec<Appearance>>,
+ #[serde(default)]
pub external_ids: BTreeMap<String, String>,
}