From 23ca2dc7d13586c9c108dfe2da72fd22ecf2ee88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=91=D0=B0?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Fri, 17 Apr 2026 06:22:55 +0000 Subject: [PATCH] V 0.1.1 --- src/config.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 60a5ab5..a43e492 100644 --- a/src/config.rs +++ b/src/config.rs @@ -4,12 +4,20 @@ use std::env; #[derive(Debug, Clone)] pub struct Config { + // Synology pub nas_fqdn: String, pub nas_user: String, pub nas_pass: String, pub nas_file: String, + // Nexrender pub nexrender_api_url: String, pub output_folder: String, + // Templates (all required) + pub template_double_src: String, + pub template_single_src: String, + pub template_composition: String, + pub template_output_module: String, + pub template_output_ext: String, } impl Config { @@ -21,8 +29,19 @@ impl Config { nas_user: env::var("NAS_USER").context("NAS_USER not set")?, nas_pass: env::var("NAS_PASS").context("NAS_PASS not set")?, nas_file: env::var("NAS_FILE").context("NAS_FILE not set")?, - nexrender_api_url: env::var("NEXRENDER_API_URL").context("NEXRENDER_API_URL not set")?, + nexrender_api_url: env::var("NEXRENDER_API_URL") + .context("NEXRENDER_API_URL not set")?, output_folder: env::var("OUTPUT_FOLDER").context("OUTPUT_FOLDER not set")?, + template_double_src: env::var("TEMPLATE_DOUBLE_SRC") + .context("TEMPLATE_DOUBLE_SRC not set")?, + template_single_src: env::var("TEMPLATE_SINGLE_SRC") + .context("TEMPLATE_SINGLE_SRC not set")?, + template_composition: env::var("TEMPLATE_COMPOSITION") + .context("TEMPLATE_COMPOSITION not set")?, + template_output_module: env::var("TEMPLATE_OUTPUT_MODULE") + .context("TEMPLATE_OUTPUT_MODULE not set")?, + template_output_ext: env::var("TEMPLATE_OUTPUT_EXT") + .context("TEMPLATE_OUTPUT_EXT not set")?, }) } } \ No newline at end of file