From 700b041f9a2a9c882e1cb6d3a008eeb461e66c0f Mon Sep 17 00:00:00 2001 From: bytedream Date: Thu, 27 Jul 2023 14:18:53 +0200 Subject: [PATCH] Remove deprecated archive --locale flag --- crunchy-cli-core/src/archive/command.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/crunchy-cli-core/src/archive/command.rs b/crunchy-cli-core/src/archive/command.rs index 9a2ee21..398f6c7 100644 --- a/crunchy-cli-core/src/archive/command.rs +++ b/crunchy-cli-core/src/archive/command.rs @@ -15,7 +15,7 @@ use anyhow::Result; use chrono::Duration; use crunchyroll_rs::media::{Resolution, Subtitle}; use crunchyroll_rs::Locale; -use log::{debug, warn}; +use log::debug; use std::collections::HashMap; use std::path::PathBuf; @@ -29,9 +29,6 @@ pub struct Archive { Available languages are:\n {}", Locale::all().into_iter().map(|l| format!("{:<6} → {}", l.to_string(), l.to_human_readable())).collect::>().join("\n ")))] #[arg(short, long, default_values_t = vec![Locale::ja_JP, crate::utils::locale::system_locale()])] pub(crate) audio: Vec, - #[arg(help = "Deprecated. Use '-a' / '--audio' instead")] - #[arg(short, long)] - locale: Vec, #[arg(help = format!("Subtitle languages. Can be used multiple times. \ Available languages are: {}", Locale::all().into_iter().map(|l| l.to_string()).collect::>().join(", ")))] #[arg(long_help = format!("Subtitle languages. Can be used multiple times. \ @@ -122,15 +119,6 @@ impl Execute for Archive { bail!("File extension is not '.mkv'. Currently only matroska / '.mkv' files are supported") } - if !self.locale.is_empty() { - warn!("The '-l' / '--locale' flag is deprecated, use '-a' / '--audio' instead"); - for locale in &self.locale { - if !self.audio.contains(locale) { - self.audio.push(locale.clone()) - } - } - } - self.audio = all_locale_in_locales(self.audio.clone()); self.subtitle = all_locale_in_locales(self.subtitle.clone());