mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
Fix panic when in anonymously
This commit is contained in:
parent
509683d23a
commit
756022b955
1 changed files with 17 additions and 7 deletions
|
|
@ -171,13 +171,23 @@ impl Filter {
|
|||
eps.retain(|e| e.audio_locale == season_locale)
|
||||
}
|
||||
|
||||
if eps.len() < season.number_of_episodes as usize
|
||||
&& !(self.audios_missing)(
|
||||
FilterMediaScope::Episode(vec![eps.first().unwrap(), eps.last().unwrap()]),
|
||||
vec![&eps.first().unwrap().audio_locale],
|
||||
)?
|
||||
{
|
||||
return Ok(vec![]);
|
||||
#[allow(clippy::if_same_then_else)]
|
||||
if eps.len() < season.number_of_episodes as usize {
|
||||
if eps.is_empty()
|
||||
&& !(self.audios_missing)(
|
||||
FilterMediaScope::Season(&season),
|
||||
season.audio_locales.iter().collect(),
|
||||
)?
|
||||
{
|
||||
return Ok(vec![]);
|
||||
} else if !eps.is_empty()
|
||||
&& !(self.audios_missing)(
|
||||
FilterMediaScope::Episode(vec![eps.first().unwrap(), eps.last().unwrap()]),
|
||||
vec![&eps.first().unwrap().audio_locale],
|
||||
)?
|
||||
{
|
||||
return Ok(vec![]);
|
||||
}
|
||||
}
|
||||
|
||||
episodes.extend(eps)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue