mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
Fix open-ended episode filter (#293)
This commit is contained in:
parent
2e6246c439
commit
172e3612d0
1 changed files with 7 additions and 4 deletions
|
|
@ -46,10 +46,13 @@ impl UrlFilter {
|
|||
let from_season = f.from_season.unwrap_or(u32::MIN);
|
||||
let to_season = f.to_season.unwrap_or(u32::MAX);
|
||||
|
||||
episode >= from_episode
|
||||
&& episode <= to_episode
|
||||
&& season >= from_season
|
||||
&& season <= to_season
|
||||
if season < from_season || season > to_season {
|
||||
false
|
||||
} else if season == from_season {
|
||||
episode >= from_episode && episode <= to_episode
|
||||
} else {
|
||||
true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue