Rename --sync-tolerance to --merge-sync-tolerance and --merge-sync-precision to --merge-sync-precision

This commit is contained in:
bytedream 2024-05-04 23:08:55 +02:00
parent 757d3094ea
commit dad91dba91
3 changed files with 20 additions and 20 deletions

View file

@ -109,12 +109,12 @@ pub struct Archive {
help = "If the merge behavior is 'sync', specify the difference by which two fingerprints are considered equal, higher values can help when the algorithm fails"
)]
#[arg(long, default_value_t = 6)]
pub(crate) sync_tolerance: u32,
pub(crate) merge_sync_tolerance: u32,
#[arg(
help = "If the merge behavior is 'sync', specify the amount of offset determination runs from which the final offset is calculated, higher values will increase the time required but lead to more precise offsets"
)]
#[arg(long, default_value_t = 4)]
pub(crate) sync_precision: u32,
pub(crate) merge_sync_precision: u32,
#[arg(
help = "Specified which language tagging the audio and subtitle tracks and language specific format options should have. \
@ -308,12 +308,12 @@ impl Execute for Archive {
.audio_sort(Some(self.audio.clone()))
.subtitle_sort(Some(self.subtitle.clone()))
.no_closed_caption(self.no_closed_caption)
.sync_tolerance(match self.merge {
MergeBehavior::Sync => Some(self.sync_tolerance),
.merge_sync_tolerance(match self.merge {
MergeBehavior::Sync => Some(self.merge_sync_tolerance),
_ => None,
})
.sync_precision(match self.merge {
MergeBehavior::Sync => Some(self.sync_precision),
.merge_sync_precision(match self.merge {
MergeBehavior::Sync => Some(self.merge_sync_precision),
_ => None,
})
.threads(self.threads)