aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-30 23:52:24 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-30 23:52:24 +0100
commit07bab4d842d23908a34daf5adf96280a4002665a (patch)
treee4a1cf19030b7883403e0bfddebb786e9c6328da /common
parent9d6411fd92e73c204425f8dd37dc3cf567f604e4 (diff)
downloadjellything-07bab4d842d23908a34daf5adf96280a4002665a.tar
jellything-07bab4d842d23908a34daf5adf96280a4002665a.tar.bz2
jellything-07bab4d842d23908a34daf5adf96280a4002665a.tar.zst
music and proper parent slug
Diffstat (limited to 'common')
-rw-r--r--common/src/lib.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index 5dadd1c..4d6123c 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -15,7 +15,10 @@ pub use chrono;
use bincode::{Decode, Encode};
use serde::{Deserialize, Serialize};
-use std::{collections::BTreeMap, path::PathBuf};
+use std::{
+ collections::{BTreeMap, BTreeSet},
+ path::PathBuf,
+};
#[derive(
Clone, Copy, Debug, Serialize, Deserialize, Encode, Decode, PartialEq, Eq, PartialOrd, Ord,
@@ -26,7 +29,7 @@ pub struct NodeID(pub [u8; 32]);
pub struct Node {
pub slug: String,
#[serde(default)]
- pub parents: Vec<NodeID>,
+ pub parents: BTreeSet<NodeID>,
pub kind: Option<NodeKind>,
pub poster: Option<Asset>,
pub backdrop: Option<Asset>,
@@ -99,6 +102,7 @@ pub enum NodeKind {
#[default]
Movie,
Video,
+ Music,
ShortFormVideo,
Collection,
Channel,