aboutsummaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-08-03 15:36:34 +0200
committermetamuffin <metamuffin@disroot.org>2023-08-03 15:36:34 +0200
commit9898998344f9897d59b629ce643a0e243f5e7b09 (patch)
tree8571f09510b9e940c0cf86b714e24dce226557ef /common/src
parentc0828abd8a0f02240520f3c36419d3a83086fd2b (diff)
downloadjellything-9898998344f9897d59b629ce643a0e243f5e7b09.tar
jellything-9898998344f9897d59b629ce643a0e243f5e7b09.tar.bz2
jellything-9898998344f9897d59b629ce643a0e243f5e7b09.tar.zst
federated assets and refactored asset paths
Diffstat (limited to 'common/src')
-rw-r--r--common/src/lib.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index 6f6caf5..be25157 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -20,8 +20,8 @@ pub struct Node {
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct NodePrivate {
#[serde(default)] pub import: Option<RemoteImportOptions>,
- #[serde(default)] pub poster: Option<PathBuf>,
- #[serde(default)] pub backdrop: Option<PathBuf>,
+ #[serde(default)] pub poster: Option<AssetLocation>,
+ #[serde(default)] pub backdrop: Option<AssetLocation>,
#[serde(default)] pub source: Option<MediaSource>,
}
@@ -48,6 +48,14 @@ pub struct RemoteImportOptions {
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
+pub enum AssetLocation {
+ Cache(PathBuf),
+ Library(PathBuf),
+ Assets(PathBuf),
+}
+
+#[derive(Debug, Clone, Deserialize, Serialize)]
+#[serde(rename_all = "snake_case")]
pub enum NodeKind {
Movie,
Collection,