Skip to content

Commit

Permalink
Update glotz.py
Browse files Browse the repository at this point in the history
bugfix for shows that contain only 1 episode
  • Loading branch information
3OW authored Apr 15, 2021
1 parent 049af12 commit f8c7406
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ext3/pyglotz/glotz.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ def __init__(self, data):
self.year = data.get('Series').get('year')
self.episodes = list()
if data.get('Episode'):
for ep in data.get('Episode'):
self.episodes.append(Episode(ep))
if isinstance(data.get('Episode'), list):
for ep in data.get('Episode'):
self.episodes.append(Episode(ep))
else:
self.episodes.append(Episode(data.get('Episode')))
self.aliases = list()

def __repr__(self):
Expand Down

0 comments on commit f8c7406

Please sign in to comment.