From 3d0436f18e50887e5f0a2406b236ba90dda57ab3 Mon Sep 17 00:00:00 2001 From: Didier Date: Mon, 8 May 2023 14:21:45 +0200 Subject: [PATCH] refactor: changed some code to enable for filewatchers. --- src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 2908fa6..77940ca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,6 +8,7 @@ use simple_log::LogConfigBuilder; use renice::renice; use transcode::job::TranscodeJob; +use crate::configuration::Config; mod configuration; mod files; @@ -30,6 +31,12 @@ fn main() { .collect::>(); info!("Found {} file(s) to be processed.", input_files.len()); + let success_count = start_transcode_run(&input_files, &config); + + info!("Finished processing {}/{} file(s).", success_count, input_files.len()); +} + +fn start_transcode_run(input_files: &Vec, config: &Config) -> i32 { let mut success_count = 0; for file in input_files { @@ -83,7 +90,7 @@ fn main() { success_count += 1; } - info!("Finished processing {} file(s).", success_count); + success_count } fn setup_logger(config: &configuration::Config) {