diff --git a/src/command/crf_search.rs b/src/command/crf_search.rs index 05ad7ca..a0eefd4 100644 --- a/src/command/crf_search.rs +++ b/src/command/crf_search.rs @@ -67,6 +67,11 @@ pub struct Args { #[arg(long)] pub crf_increment: Option, + // TODO refactor into Samples ArgGroup + /// Keep temporary files after exiting. + #[arg(long)] + pub keep: bool, + /// Enable sample-encode caching. #[arg( long, @@ -125,6 +130,7 @@ pub async fn run( thorough, sample, quiet, + keep, cache, vmaf, }: &Args, @@ -146,7 +152,7 @@ pub async fn run( args: args.clone(), crf: 0.0, sample: sample.clone(), - keep: false, + keep: *keep, cache: *cache, stdout_format: sample_encode::StdoutFormat::Json, vmaf: vmaf.clone(), diff --git a/src/main.rs b/src/main.rs index 4f99524..c5356ef 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,6 +59,7 @@ impl Command { fn keep_temp_files(&self) -> bool { match self { Self::SampleEncode(args) => args.keep, + Self::CrfSearch(args) => args.keep, _ => false, } }