From 9f1f57109450e9bd5b804e82fe4dbfa02c80bb8d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 9 Feb 2013 18:54:18 +0000 Subject: [PATCH] if series is set it is an episode --- pandora/archive/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 7d95fefaf..a708266fc 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -147,8 +147,11 @@ class File(models.Model): if self.item: for key in self.ITEM_INFO: data[key] = self.item.get(key) + if self.item.get('series'): + data['isEpisode'] = True data['directorSort'] = [get_name_sort(n) for n in self.item.get('director', [])] - data['isEpisode'] = data.get('season') != None \ + data['isEpisode'] = 'isEpisode' in data \ + or data.get('season') != None \ or data.get('episode') != None \ or data.get('episodes') not in ([], None) \ or (data.get('seriesTitle') != None and data.get('episodeTitle') != None)