diff options
author | metamuffin <metamuffin@disroot.org> | 2023-06-12 22:54:04 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-06-12 22:54:04 +0200 |
commit | 905ffe80fcd97b1b6b2c194181b2426b601d52d1 (patch) | |
tree | 144608428f7b147934373cad98ef01818740cfb4 /common/src/lib.rs | |
parent | 026c72d54f0adfcb20b239f3e76f1938ec644f25 (diff) | |
download | jellything-905ffe80fcd97b1b6b2c194181b2426b601d52d1.tar jellything-905ffe80fcd97b1b6b2c194181b2426b601d52d1.tar.bz2 jellything-905ffe80fcd97b1b6b2c194181b2426b601d52d1.tar.zst |
fallback banner and directory cards
Diffstat (limited to 'common/src/lib.rs')
-rw-r--r-- | common/src/lib.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs index 427ec1a..57e3631 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -8,6 +8,24 @@ use std::{collections::BTreeMap, path::PathBuf}; #[derive(Debug, Clone, Deserialize, Serialize)] pub struct DirectoryInfo { pub name: String, + pub banner: Option<PathBuf>, + + #[serde(default)] + pub kind: DirectoryKind, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +#[serde(rename_all = "snake_case")] +pub enum DirectoryKind { + Folder, + Series, + Show, + Season, +} +impl Default for DirectoryKind { + fn default() -> Self { + Self::Folder + } } #[derive(Debug, Clone, Deserialize, Serialize)] |