diff --git a/README.md b/README.md
index 1fdf348..29893f9 100644
--- a/README.md
+++ b/README.md
@@ -482,14 +482,14 @@ The `archive` command lets you download episodes with multiple audios and subtit
Default are `200` milliseconds.
-- Sync tolerance
+- Merge sync tolerance
Sometimes two video tracks are downloaded with `--merge` set to `sync` because the audio fingerprinting fails to identify matching audio parts (e.g. opening).
- To prevent this, you can use the `--sync-tolerance` flag to specify the difference by which two fingerprints are considered equal.
+ To prevent this, you can use the `--merge-sync-tolerance` flag to specify the difference by which two fingerprints are considered equal.
Default is `6`.
-- Sync precision
+- Merge sync precision
If you use `--merge` set to `sync` and the syncing seems to be not accurate enough or takes to long, you can use the `--sync-precision` flag to specify the amount of offset determination runs from which the final offset is calculated.
diff --git a/crunchy-cli-core/src/archive/command.rs b/crunchy-cli-core/src/archive/command.rs
index 70142ec..38bddc1 100644
--- a/crunchy-cli-core/src/archive/command.rs
+++ b/crunchy-cli-core/src/archive/command.rs
@@ -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)
diff --git a/crunchy-cli-core/src/utils/download.rs b/crunchy-cli-core/src/utils/download.rs
index 9fe4f79..565ed7d 100644
--- a/crunchy-cli-core/src/utils/download.rs
+++ b/crunchy-cli-core/src/utils/download.rs
@@ -64,8 +64,8 @@ pub struct DownloadBuilder {
force_hardsub: bool,
download_fonts: bool,
no_closed_caption: bool,
- sync_tolerance: Option,
- sync_precision: Option,
+ merge_sync_tolerance: Option,
+ merge_sync_precision: Option,
threads: usize,
ffmpeg_threads: Option,
audio_locale_output_map: HashMap,
@@ -85,8 +85,8 @@ impl DownloadBuilder {
force_hardsub: false,
download_fonts: false,
no_closed_caption: false,
- sync_tolerance: None,
- sync_precision: None,
+ merge_sync_tolerance: None,
+ merge_sync_precision: None,
threads: num_cpus::get(),
ffmpeg_threads: None,
audio_locale_output_map: HashMap::new(),
@@ -108,8 +108,8 @@ impl DownloadBuilder {
download_fonts: self.download_fonts,
no_closed_caption: self.no_closed_caption,
- sync_tolerance: self.sync_tolerance,
- sync_precision: self.sync_precision,
+ merge_sync_tolerance: self.merge_sync_tolerance,
+ merge_sync_precision: self.merge_sync_precision,
download_threads: self.threads,
ffmpeg_threads: self.ffmpeg_threads,
@@ -168,8 +168,8 @@ pub struct Downloader {
download_fonts: bool,
no_closed_caption: bool,
- sync_tolerance: Option,
- sync_precision: Option,
+ merge_sync_tolerance: Option,
+ merge_sync_precision: Option,
download_threads: usize,
ffmpeg_threads: Option,
@@ -287,13 +287,13 @@ impl Downloader {
}
}
- if self.formats.len() > 1 && self.sync_tolerance.is_some() {
+ if self.formats.len() > 1 && self.merge_sync_tolerance.is_some() {
let _progress_handler =
progress!("Syncing video start times (this might take some time)");
let mut offsets = sync_audios(
&raw_audios,
- self.sync_tolerance.unwrap(),
- self.sync_precision.unwrap(),
+ self.merge_sync_tolerance.unwrap(),
+ self.merge_sync_precision.unwrap(),
)?;
drop(_progress_handler);