// yt - A fully featured command line YouTube client // // Copyright (C) 2024 Benedikt Peetz // SPDX-License-Identifier: GPL-3.0-or-later // // This file is part of Yt. // // You should have received a copy of the License along with this program. // If not, see . use std::path::PathBuf; use serde::Deserialize; #[derive(Debug, Deserialize, PartialEq)] #[serde(deny_unknown_fields)] pub struct ConfigFile { pub select: Option, pub watch: Option, pub paths: Option, pub download: Option, pub update: Option, } #[derive(Debug, Deserialize, PartialEq, Clone, Copy)] #[serde(deny_unknown_fields)] pub struct UpdateConfig { pub max_backlog: Option, } #[derive(Debug, Deserialize, PartialEq, Clone)] #[serde(deny_unknown_fields)] pub struct DownloadConfig { /// This will then be converted to an u64 pub max_cache_size: Option, } #[derive(Debug, Deserialize, PartialEq, Clone)] #[serde(deny_unknown_fields)] pub struct SelectConfig { pub playback_speed: Option, pub subtitle_langs: Option, } #[derive(Debug, Deserialize, PartialEq, Clone, Copy)] #[serde(deny_unknown_fields)] pub struct WatchConfig { pub local_comments_length: Option, } #[derive(Debug, Deserialize, PartialEq, Clone)] #[serde(deny_unknown_fields)] pub struct PathsConfig { pub download_dir: Option, pub mpv_config_path: Option, pub mpv_input_path: Option, pub database_path: Option, pub last_selection_path: Option, }