From 280ae04b3d66f95e2c514e96c3669371855ac573 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Thu, 8 Oct 2020 13:32:25 -0700 Subject: [PATCH] Set art to None for plexapi.video.Season/Episode --- lib/plexapi/video.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/plexapi/video.py b/lib/plexapi/video.py index 343c67c6..ab1c3005 100644 --- a/lib/plexapi/video.py +++ b/lib/plexapi/video.py @@ -533,7 +533,8 @@ class Season(Video): Video._loadData(self, data) # fix key if loaded from search self.key = self.key.replace('/children', '') - self.art = data.attrib.get('art') + art = data.attrib.get('art') + self.art = art if art and str(self.ratingKey) in art else None self.guid = data.attrib.get('guid') self.leafCount = utils.cast(int, data.attrib.get('leafCount')) self.index = utils.cast(int, data.attrib.get('index')) @@ -666,7 +667,8 @@ class Episode(Playable, Video): Playable._loadData(self, data) self._details_key = self.key + self._include self._seasonNumber = None # cached season number - self.art = data.attrib.get('art') + art = data.attrib.get('art') + self.art = art if art and str(self.ratingKey) in art else None self.chapterSource = data.attrib.get('chapterSource') self.contentRating = data.attrib.get('contentRating') self.duration = utils.cast(int, data.attrib.get('duration'))