From f8c7406e4a107b69bc8a637d6fb7ecb2ff627516 Mon Sep 17 00:00:00 2001 From: 3OW Date: Fri, 16 Apr 2021 01:31:16 +0200 Subject: [PATCH] Update glotz.py bugfix for shows that contain only 1 episode --- ext3/pyglotz/glotz.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ext3/pyglotz/glotz.py b/ext3/pyglotz/glotz.py index 394ea1028b..9f18d58ba6 100644 --- a/ext3/pyglotz/glotz.py +++ b/ext3/pyglotz/glotz.py @@ -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):