mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-15 16:13:20 -06:00
Fix incorrect episode count being used in verify_episode
The season acquired from CLI is one-indexed while episode_counts of course is zero-indexed. This was not accounted for in `verify_episode`, thus it would error on Season 3, Episode 15 (since Season 4 was accessed, which had 14 episodes).
This commit is contained in:
@@ -76,7 +76,7 @@ def verify_episode(season: int, episode: int = None) -> bool:
|
|||||||
"""
|
"""
|
||||||
Verifies that specific Season and/or Episode is valid.
|
Verifies that specific Season and/or Episode is valid.
|
||||||
"""
|
"""
|
||||||
return 1 <= season <= 9 and (episode is None or 1 <= episode <= episode_counts[season])
|
return 1 <= season <= 9 and (episode is None or 1 <= episode <= episode_counts[season - 1])
|
||||||
|
|
||||||
|
|
||||||
def sleep_from(wait_time: float, moment: float, manager: enlighten.Manager = None) -> float:
|
def sleep_from(wait_time: float, moment: float, manager: enlighten.Manager = None) -> float:
|
||||||
|
|||||||
Reference in New Issue
Block a user