refactor: changed some code to enable for filewatchers.
This commit is contained in:
parent
25aeb6fddc
commit
3d0436f18e
1 changed files with 8 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue