From 0bbb86d954d364c354b6b91dc44c393dd7b0dd3b Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sat, 19 May 2018 09:24:54 -0500 Subject: [PATCH] Update platformtools.py --- plugin.video.alfa/platformcode/platformtools.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/plugin.video.alfa/platformcode/platformtools.py b/plugin.video.alfa/platformcode/platformtools.py index eba9e519..7c934e31 100644 --- a/plugin.video.alfa/platformcode/platformtools.py +++ b/plugin.video.alfa/platformcode/platformtools.py @@ -130,7 +130,10 @@ def render_items(itemlist, parent_item): # Recorremos el itemlist for item in itemlist: - channel_parameters = channeltools.get_channel_parameters(item.channel) + try: + channel_parameters = channeltools.get_channel_parameters(item.channel) + except: + pass #logger.debug(item) # Si el item no contiene categoria, le ponemos la del item padre if item.category == "": @@ -172,9 +175,11 @@ def render_items(itemlist, parent_item): # AƱade headers a las imagenes si estan en un servidor con cloudflare from core import httptools - item.thumbnail = httptools.get_url_headers(item.thumbnail) + if item.action == 'play': + item.thumbnail = unify.thumbnail_type(item) + else: + item.thumbnail = httptools.get_url_headers(item.thumbnail) item.fanart = httptools.get_url_headers(item.fanart) - item.thumbnail = unify.thumbnail_type(item) # IconImage para folder y video if item.folder: icon_image = "DefaultFolder.png" @@ -192,12 +197,12 @@ def render_items(itemlist, parent_item): fanart = os.path.join(config.get_runtime_path(), "fanart.jpg") # Creamos el listitem - listitem = xbmcgui.ListItem(item.title) + #listitem = xbmcgui.ListItem(item.title) # values icon, thumb or poster are skin dependent.. so we set all to avoid problems # if not exists thumb it's used icon value if config.get_platform(True)['num_version'] >= 16.0: - listitem.setArt({'icon': icon_image, 'thumb': item.contentThumbnail, 'poster': item.thumbnail, + listitem.setArt({'icon': icon_image, 'thumb': item.thumbnail, 'poster': item.thumbnail, 'fanart': fanart}) else: listitem.setIconImage(icon_image)