refactor: changed some code to enable for filewatchers.

This commit is contained in:
Didier Slof 2023-05-08 14:21:45 +02:00
parent 25aeb6fddc
commit 3d0436f18e
Signed by: didier
GPG key ID: 01E71F18AA4398E5

View file

@ -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::<Vec<_>>();
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<PathBuf>, 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) {