|
|
|
@ -13,7 +13,6 @@ pub enum ConfigFilesCleanupOriginalBehavior {
|
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
|
|
|
pub struct ConfigFilesCleanupArchive {
|
|
|
|
|
pub path: String,
|
|
|
|
|
pub keep_file_structure: bool,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
|
|
@ -31,11 +30,10 @@ pub struct ConfigFilesCleanup {
|
|
|
|
|
|
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
|
|
|
pub struct ConfigFiles {
|
|
|
|
|
pub keep_file_structure: bool,
|
|
|
|
|
pub input_path: String,
|
|
|
|
|
pub output_path: String,
|
|
|
|
|
pub include: Vec<String>,
|
|
|
|
|
pub cleanup: ConfigFilesCleanup,
|
|
|
|
|
pub cleanup: Option<ConfigFilesCleanup>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
|
|
@ -67,6 +65,8 @@ pub struct ConfigFFmpegOutput {
|
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
|
|
|
pub struct ConfigFFmpeg {
|
|
|
|
|
pub path: String,
|
|
|
|
|
pub extra_args: Option<Vec<String>>,
|
|
|
|
|
pub overwrite: Option<bool>,
|
|
|
|
|
pub process: ConfigFFmpegProcess,
|
|
|
|
|
pub output: ConfigFFmpegOutput,
|
|
|
|
|
}
|
|
|
|
@ -83,24 +83,15 @@ impl Config {
|
|
|
|
|
Config {
|
|
|
|
|
debug: None,
|
|
|
|
|
files: ConfigFiles {
|
|
|
|
|
keep_file_structure: false,
|
|
|
|
|
input_path: String::from("/data/input"),
|
|
|
|
|
output_path: String::from("/data/output"),
|
|
|
|
|
include: Vec::new(),
|
|
|
|
|
cleanup: ConfigFilesCleanup {
|
|
|
|
|
enabled: false,
|
|
|
|
|
original_cleanup_behavior: ConfigFilesCleanupOriginalBehavior::delete,
|
|
|
|
|
archive: ConfigFilesCleanupArchive {
|
|
|
|
|
path: String::from("/data/archive"),
|
|
|
|
|
keep_file_structure: false,
|
|
|
|
|
},
|
|
|
|
|
delete: ConfigFilesCleanupDelete {
|
|
|
|
|
remove_empty_directories: false
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
cleanup: None
|
|
|
|
|
},
|
|
|
|
|
ffmpeg: ConfigFFmpeg {
|
|
|
|
|
path: String::from("/usr/bin/ffmpeg"),
|
|
|
|
|
extra_args: None,
|
|
|
|
|
overwrite: None,
|
|
|
|
|
process: ConfigFFmpegProcess {
|
|
|
|
|
threads: Some(0),
|
|
|
|
|
niceness: Some(0),
|
|
|
|
|