From 57236f2b319bee69b3f436572223d729b017aa5d Mon Sep 17 00:00:00 2001 From: ByteDream Date: Thu, 23 Mar 2023 01:51:51 +0100 Subject: [PATCH] Add a flag to enable experimental fixes (disabled by default now) --- crunchy-cli-core/src/lib.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crunchy-cli-core/src/lib.rs b/crunchy-cli-core/src/lib.rs index 5e0e113..8bb6768 100644 --- a/crunchy-cli-core/src/lib.rs +++ b/crunchy-cli-core/src/lib.rs @@ -38,6 +38,15 @@ pub struct Cli { #[arg(long)] lang: Option, + #[arg(help = "Enable experimental fixes which may resolve some unexpected errors")] + #[arg( + long_help = "Enable experimental fixes which may resolve some unexpected errors. \ + If everything works as intended this option isn't needed, but sometimes Crunchyroll mislabels \ + the audio of a series/season or episode or returns a wrong season number. This is when using this option might help to solve the issue" + )] + #[arg(long, default_value_t = false)] + experimental_fixes: bool, + #[clap(flatten)] login_method: LoginMethod, @@ -227,8 +236,8 @@ async fn crunchyroll_session(cli: &Cli) -> Result { let mut builder = Crunchyroll::builder() .locale(locale) - .stabilization_locales(true) - .stabilization_season_number(true); + .stabilization_locales(cli.experimental_fixes) + .stabilization_season_number(cli.experimental_fixes); if let Command::Download(download) = &cli.command { builder = builder.preferred_audio_locale(download.audio.clone())