From dabfee58438544d8051fb33698b20140b537c758 Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Thu, 28 Mar 2019 20:43:30 +0100 Subject: [PATCH] small changes --- plugin.video.alfa/channels/support.py | 17 ++++++++++++++--- plugin.video.alfa/channelselector.py | 7 ++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/plugin.video.alfa/channels/support.py b/plugin.video.alfa/channels/support.py index bb557bab..fae7cea0 100644 --- a/plugin.video.alfa/channels/support.py +++ b/plugin.video.alfa/channels/support.py @@ -266,12 +266,23 @@ def swzz_get_url(item): return data -def menu(itemlist, title='', action='', url='', contentType='movie'): +def menu(itemlist, title='', action='', url='', contentType='movie'): frame = inspect.stack()[1] filename = frame[0].f_code.co_filename filename = os.path.basename(filename).replace('.py','') logger.info('FILENAME= ' + filename) + if 'color' in title: + color = scrapertoolsV2.find_single_match(title,'color ([a-z]+)') + title = re.sub('.color.([a-z]+)','',title) + title = '[COLOR '+ color +']' + title + '[/COLOR]' + if 'bold' in title: + title = re.sub('.bold','',title) + title = '[B]' + title + '[/B]' + if 'italic' in title: + title = re.sub('.italic','',title) + title = '[I]' + title + '[/I]' + itemlist.append(Item( channel = filename, title = title, @@ -280,5 +291,5 @@ def menu(itemlist, title='', action='', url='', contentType='movie'): contentType = contentType )) from channelselector import thumb - itemlist = thumb(itemlist) - return itemlist \ No newline at end of file + thumb(itemlist) + return itemlist \ No newline at end of file diff --git a/plugin.video.alfa/channelselector.py b/plugin.video.alfa/channelselector.py index 1842f3f3..4bb1721b 100644 --- a/plugin.video.alfa/channelselector.py +++ b/plugin.video.alfa/channelselector.py @@ -347,13 +347,14 @@ def thumb(itemlist=[]): import re icon_dict = {'channels_movie':['film'], - 'channels_tvshow':['serie','tv'], + 'channels_tvshow':['serie','tv','episodi','episodio'], + 'channels_documentary':['documentari','documentario'], 'news':['novità', "novita'"], - 'now_playing':['cinema'], + 'now_playing':['cinema', 'in sala'], 'channels_anime':['anime'], 'genres':['genere', 'generi', 'categorie', 'categoria']} - suffix_dict = {'_hd':['hd'], + suffix_dict = {'_hd':['hd','altadefinizione','alta definizione'], '_4k':['4K'], '_az':['lettera','lista','alfabetico','a-z'], '_year':['anno'],