diff --git a/ChannelProvider/SVT/__init__.py b/ChannelProvider/SVT/__init__.py index 25f4eed..288dbd0 100644 --- a/ChannelProvider/SVT/__init__.py +++ b/ChannelProvider/SVT/__init__.py @@ -39,6 +39,7 @@ class SVT(ChannelProvider.ChannelProvider): if key in self.m_cache.keys(): thumbnail_link = self.m_cache[key]['thumbnail_link'] + content = self.m_cache[key]['content'] resolved_link = self.m_cache[key]['resolved_link'] description = self.m_cache[key]['description'] published_parsed = self.m_cache[key]['published_parsed'] @@ -72,14 +73,16 @@ class SVT(ChannelProvider.ChannelProvider): description = str(entry['description']) published_parsed = entry['published_parsed'] title = str(entry['title']) + res = requests.get(thumbnail_link) + content = res.content + content_bytes = io.BytesIO(content) self.m_cache[key] = {'thumbnail_link': thumbnail_link} + self.m_cache[key]['content'] = content self.m_cache[key]['resolved_link'] = resolved_link self.m_cache[key]['description'] = description self.m_cache[key]['published_parsed'] = published_parsed self.m_cache[key]['title'] = title - res = requests.get(thumbnail_link) - content_bytes = io.BytesIO(res.content) image = wx.Image(content_bytes, type=wx.BITMAP_TYPE_ANY, index=-1)