Skip to content

Commit

Permalink
Handle case where episode names exist by airdates don't
Browse files Browse the repository at this point in the history
  • Loading branch information
lepinkainen committed Jan 4, 2016
1 parent 3d1512e commit 368f56a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyfibot/modules/module_tvmaze.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def command_maze(bot, user, channel, args):

# go through the episodes in reverse order
for episode in reversed(show.episodes):
# episode has id and name, but no airstamp yet (not announced)
if not episode.airstamp:
continue

delta = relativedelta(parse(episode.airstamp), now)

# episode is in the past, stop searching
Expand Down

0 comments on commit 368f56a

Please sign in to comment.