From 5a839b203685d524777cc84a1dd7bcb519f9a711 Mon Sep 17 00:00:00 2001 From: Bas Rieter Date: Fri, 18 Aug 2023 22:26:24 +0200 Subject: [PATCH] Fixed: Thumbs for TV4 Play. --- channels/channel.se/tv4se/chn_tv4se.py | 29 ++++++++++++-------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/channels/channel.se/tv4se/chn_tv4se.py b/channels/channel.se/tv4se/chn_tv4se.py index e62550fe..b59952a9 100644 --- a/channels/channel.se/tv4se/chn_tv4se.py +++ b/channels/channel.se/tv4se/chn_tv4se.py @@ -11,7 +11,6 @@ from resources.lib.addonsettings import AddonSettings from resources.lib.helpers.jsonhelper import JsonHelper -from resources.lib.regexer import Regexer from resources.lib.helpers.htmlentityhelper import HtmlEntityHelper from resources.lib.helpers.languagehelper import LanguageHelper from resources.lib.logger import Logger @@ -276,16 +275,16 @@ def create_api_program_type(self, result_set): item.description = result_set.get("description", None) item.thumb = result_set.get("image") - if item.thumb is not None: - item.thumb = "https://imageproxy.b17g.services/?format=jpg&shape=cut" \ - "&quality=70&resize=520x293&source={}" \ - .format(HtmlEntityHelper.url_encode(item.thumb)) + # if item.thumb is not None and "://img.b17g.net/" in item.thumb: + # item.thumb = "https://imageproxy.b17g.services/?format=jpg&shape=cut" \ + # "&quality=70&resize=520x293&source={}" \ + # .format(HtmlEntityHelper.url_encode(item.thumb)) item.fanart = result_set.get("image") - if item.fanart is not None: - item.fanart = "https://imageproxy.b17g.services/?format=jpg&shape=cut" \ - "&quality=70&resize=1280x720&source={}" \ - .format(HtmlEntityHelper.url_encode(item.fanart)) + # if item.fanart is not None and "://img.b17g.net/" in item.fanart: + # item.fanart = "https://imageproxy.b17g.services/?format=jpg&shape=cut" \ + # "&quality=70&resize=1280x720&source={}" \ + # .format(HtmlEntityHelper.url_encode(item.fanart)) item.isPaid = result_set.get("is_premium", False) @@ -424,14 +423,12 @@ def create_api_video_asset_type(self, result_set): 0) item.fanart = result_set.get("program_image", self.parentItem.fanart) - thumb_url = result_set.get("image", result_set.get("program_image")) + item.thumb = result_set.get("image", result_set.get("program_image")) # some images need to come via a proxy: - if thumb_url and "://img.b17g.net/" in thumb_url: - item.thumb = "https://imageproxy.b17g.services/?format=jpg&shape=cut" \ - "&quality=70&resize=520x293&source={}" \ - .format(HtmlEntityHelper.url_encode(thumb_url)) - else: - item.thumb = thumb_url + # if item.thumb and "://img.b17g.net/" in item.thumb: + # item.thumb = "https://imageproxy.b17g.services/?format=jpg&shape=cut" \ + # "&quality=70&resize=520x293&source={}" \ + # .format(HtmlEntityHelper.url_encode(item.thumb)) item.media_type = mediatype.EPISODE item.complete = False