From 55e8da54a85c817bc6f71a9af43a7f6d813a67b3 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 24 Aug 2024 11:28:45 +0200 Subject: feat(cli/config): Show the currently active configuration --- src/config/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/config/mod.rs') diff --git a/src/config/mod.rs b/src/config/mod.rs index 3d0d0b5..ea40055 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -11,11 +11,13 @@ use std::path::PathBuf; use bytes::Bytes; +use serde::Serialize; mod default; mod definitions; pub mod file_system; +#[derive(Serialize)] pub struct Config { pub select: SelectConfig, pub watch: WatchConfig, @@ -23,19 +25,24 @@ pub struct Config { pub download: DownloadConfig, pub update: UpdateConfig, } +#[derive(Serialize)] pub struct UpdateConfig { pub max_backlog: u32, } +#[derive(Serialize)] pub struct DownloadConfig { pub max_cache_size: Bytes, } +#[derive(Serialize)] pub struct SelectConfig { pub playback_speed: f64, pub subtitle_langs: String, } +#[derive(Serialize)] pub struct WatchConfig { pub local_comments_length: usize, } +#[derive(Serialize)] pub struct PathsConfig { pub download_dir: PathBuf, pub mpv_config_path: PathBuf, -- cgit 1.4.1