From 905ffe80fcd97b1b6b2c194181b2426b601d52d1 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 12 Jun 2023 22:54:04 +0200 Subject: fallback banner and directory cards --- common/src/lib.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'common/src') 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, + + #[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)] -- cgit v1.2.3-70-g09d2