aboutsummaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
Diffstat (limited to 'common/src')
-rw-r--r--common/src/lib.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index 3f91a6c..34de946 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -3,8 +3,8 @@
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2023 metamuffin <metamuffin.org>
*/
-pub mod r#impl;
pub mod config;
+pub mod r#impl;
use bincode::{Decode, Encode};
use serde::{Deserialize, Serialize};
@@ -19,6 +19,7 @@ pub struct Node {
#[rustfmt::skip]
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct NodePrivate {
+ #[serde(default)] pub import: Option<ImportOptions>,
#[serde(default)] pub poster: Option<PathBuf>,
#[serde(default)] pub backdrop: Option<PathBuf>,
#[serde(default)] pub source: Option<MediaSource>,
@@ -37,6 +38,14 @@ pub struct NodePublic {
#[serde(default)] pub media: Option<MediaInfo>,
}
+#[rustfmt::skip]
+#[derive(Debug, Clone, Deserialize, Serialize)]
+pub struct ImportOptions {
+ pub host: String,
+ pub id: String,
+ #[serde(default)] pub prefix: Option<String>,
+}
+
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum NodeKind {