mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 20:22:01 -06:00
Format code
This commit is contained in:
parent
56411c6547
commit
fc6511a361
13 changed files with 42 additions and 48 deletions
|
|
@ -21,7 +21,7 @@ impl FilterOptions {
|
|||
|
||||
pub fn filter_episodes(&self, mut episodes: Vec<Episode>) -> Vec<Episode> {
|
||||
episodes.retain(|e| {
|
||||
self.check_audio_language(&vec![e.audio_locale.clone()])
|
||||
self.check_audio_language(&[e.audio_locale.clone()])
|
||||
&& self
|
||||
.url_filter
|
||||
.is_episode_valid(e.sequence_number, e.season_number)
|
||||
|
|
@ -38,7 +38,7 @@ impl FilterOptions {
|
|||
)
|
||||
}
|
||||
|
||||
fn check_audio_language(&self, audio: &Vec<Locale>) -> bool {
|
||||
fn check_audio_language(&self, audio: &[Locale]) -> bool {
|
||||
if !self.audio.is_empty() {
|
||||
return self.audio.iter().any(|a| audio.contains(a));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -372,6 +372,7 @@ impl Format {
|
|||
let stream_empty = self.check_pattern_count_empty(Scope::Stream)
|
||||
&& self.check_pattern_count_empty(Scope::Subtitle);
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
let mut tree: Vec<(Season, Vec<(Episode, Vec<Stream>)>)> = vec![];
|
||||
|
||||
let series = if !series_empty {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue