diff options
Diffstat (limited to '')
-rw-r--r-- | yt/src/config/mod.rs | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/yt/src/config/mod.rs b/yt/src/config/mod.rs deleted file mode 100644 index a10f7c2..0000000 --- a/yt/src/config/mod.rs +++ /dev/null @@ -1,76 +0,0 @@ -// yt - A fully featured command line YouTube client -// -// Copyright (C) 2024 Benedikt Peetz <benedikt.peetz@b-peetz.de> -// Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -// 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. - -#![allow(clippy::module_name_repetitions)] - -use std::path::PathBuf; - -use bytes::Bytes; -use serde::Serialize; - -mod default; -mod definitions; -pub mod file_system; - -#[derive(Serialize, Debug)] -pub struct Config { - pub global: GlobalConfig, - pub select: SelectConfig, - pub watch: WatchConfig, - pub paths: PathsConfig, - pub download: DownloadConfig, - pub update: UpdateConfig, -} -// These structures could get non-copy fields in the future. - -#[derive(Serialize, Debug)] -#[allow(missing_copy_implementations)] -pub struct GlobalConfig { - pub display_colors: bool, -} -#[derive(Serialize, Debug)] -#[allow(missing_copy_implementations)] -pub struct UpdateConfig { - pub max_backlog: usize, -} -#[derive(Serialize, Debug)] -#[allow(missing_copy_implementations)] -pub struct DownloadConfig { - pub max_cache_size: Bytes, -} -#[derive(Serialize, Debug)] -pub struct SelectConfig { - pub playback_speed: f64, - pub subtitle_langs: String, -} -#[derive(Serialize, Debug)] -#[allow(missing_copy_implementations)] -pub struct WatchConfig { - pub local_displays_length: usize, -} -#[derive(Serialize, Debug)] -pub struct PathsConfig { - pub download_dir: PathBuf, - pub mpv_config_path: PathBuf, - pub mpv_input_path: PathBuf, - pub database_path: PathBuf, - pub last_selection_path: PathBuf, -} - -// pub fn status_path() -> anyhow::Result<PathBuf> { -// const STATUS_PATH: &str = "running.info.json"; -// get_runtime_path(STATUS_PATH) -// } - -// pub fn subscriptions() -> anyhow::Result<PathBuf> { -// const SUBSCRIPTIONS: &str = "subscriptions.json"; -// get_data_path(SUBSCRIPTIONS) -// } |