diff --git a/channels/cineblog01.py b/channels/cineblog01.py index e49ec025..e90f1b48 100644 --- a/channels/cineblog01.py +++ b/channels/cineblog01.py @@ -44,8 +44,8 @@ def mainlist(item): ('Per anno', ['/serietv/', 'menu', 'Serie-Tv per Anno']), ('Ultime Aggiornate', ['/serietv/', 'peliculas', 'newest']) ] - docu = [('Documentari bullet bold', ['/category/documentario/', 'peliculas']), - ('HD submenu {documentari}', ['category/hd-alta-definizione/documentario-hd/', 'peliculas']) + docu = [('Documentari {bullet bold}', ['/category/documentario/', 'peliculas']), + ('HD {submenu} {documentari}', ['category/hd-alta-definizione/documentario-hd/', 'peliculas']) ] return locals() diff --git a/channels/eurostreaming.py b/channels/eurostreaming.py index 44e29213..152493a9 100644 --- a/channels/eurostreaming.py +++ b/channels/eurostreaming.py @@ -26,8 +26,8 @@ def mainlist(item): tvshow = [] anime = ['/category/anime-cartoni-animati/'] - mix = [('Aggiornamenti bullet bold {TV}', ['/aggiornamento-episodi/', 'peliculas', 'newest']), - ('Archivio bullet bold {TV}', ['/category/serie-tv-archive/', 'peliculas'])] + mix = [('Aggiornamenti {bullet bold} {TV}', ['/aggiornamento-episodi/', 'peliculas', 'newest']), + ('Archivio {bullet bold} {TV}', ['/category/serie-tv-archive/', 'peliculas'])] search = '' return locals() diff --git a/channels/fastsubita.py b/channels/fastsubita.py index a20d354c..39b746cb 100644 --- a/channels/fastsubita.py +++ b/channels/fastsubita.py @@ -33,7 +33,7 @@ def mainlist(item): Tvshow = [ ('Aggiornamenti', ['', 'peliculas', '', 'update']), ('Per Lettera {TV}', ['/elenco-serie-tv/', 'genres', 'genres']), - ('Cerca... {TV} bold', ['','search']) + ('Cerca... {bold}{TV}', ['','search']) ] # search = '' diff --git a/channels/ilcorsaronero.py b/channels/ilcorsaronero.py index 19f9a82b..db839bef 100644 --- a/channels/ilcorsaronero.py +++ b/channels/ilcorsaronero.py @@ -23,23 +23,23 @@ def mainlist(item): menu = [ ('BDRiP {film}', ['/categoria.php?active=0&category=1&order=data&by=DESC&page=', 'peliculas', [0, 'movie', True]]), - ('Cerca BDRiP... submenu {film}', ['/torrent-ita/1/', 'search', ['search', 'movie', True]]), + ('Cerca BDRiP... {submenu} {film}', ['/torrent-ita/1/', 'search', ['search', 'movie', True]]), ('DVD {film}', ['/categoria.php?active=0&category=20&order=data&by=DESC&page=', 'peliculas', [0, 'movie', True]]), - ('Cerca DVD... submenu {film}', ['/torrent-ita/20/', 'search', ['search', 'movie', True]]), + ('Cerca DVD... {submenu} {film}', ['/torrent-ita/20/', 'search', ['search', 'movie', True]]), ('Screener {film}', ['/categoria.php?active=0&category=19&order=data&by=DESC&page=', 'peliculas', [0, 'movie', True]]), - ('Cerca Screener.. submenu {film}', ['/torrent-ita/19/', 'search', ['search', 'movie', True]]), + ('Cerca Screener.. {submenu} {film}', ['/torrent-ita/19/', 'search', ['search', 'movie', True]]), ('Serie TV', ['/categoria.php?active=0&category=15&order=data&by=DES&page=', 'peliculas', [0 , 'tvshow', True]]), - ('Cerca Serie TV.. submenu', ['/torrent-ita/15/', 'search', ['search', 'tvshow',True]]), + ('Cerca Serie TV.. {submenu}', ['/torrent-ita/15/', 'search', ['search', 'tvshow',True]]), ('Anime', ['/categoria.php?active=0&category=5&order=data&by=DESC&page=', 'peliculas', [0, 'anime', True]]), - ('Cerca Anime.. submenu', ['/torrent-ita/5/', 'search', ['search', 'anime', True]]), + ('Cerca Anime.. {submenu}', ['/torrent-ita/5/', 'search', ['search', 'anime', True]]), ('Musica', ['/categoria.php?active=0&category=2&order=data&by=DESC&page=', 'peliculas', [0, 'music', False]]), - ('Cerca Musica.. submenu', ['/torrent-ita/2/', 'search', ['search', 'music', False]]), + ('Cerca Musica.. {submenu}', ['/torrent-ita/2/', 'search', ['search', 'music', False]]), ('Audiolibri {musica}', ['/categoria.php?active=0&category=18&order=data&by=DESC&page=', 'peliculas', [0, 'music', False]]), - ('Cerca Audiolibri.. submenu', ['/torrent-ita/18/', 'search', ['search', 'music', False]]), + ('Cerca Audiolibri.. {submenu}', ['/torrent-ita/18/', 'search', ['search', 'music', False]]), # mostrerebbe anche risultati non "multimediali" e allungherebbero inutilmente la ricerca globale # ('Altro {film}', ['/categoria.php?active=0&category=4&order=data&by=DESC&page=', 'peliculas', [0, 'other', False]]), - # ('Cerca altro.. submenu', ['/torrent-ita/4/', 'search', ['search', 'other', False]]), - # ('Cerca Tutto... color kod bold', ['/argh.php?search=', 'search', ['search', 'all', False]]) + # ('Cerca altro.. {submenu}', ['/torrent-ita/4/', 'search', ['search', 'other', False]]), + # ('Cerca Tutto... {color kod bold}', ['/argh.php?search=', 'search', ['search', 'all', False]]) ] return locals() diff --git a/channels/mondoserietv.py b/channels/mondoserietv.py index 220997f0..9b6b0044 100644 --- a/channels/mondoserietv.py +++ b/channels/mondoserietv.py @@ -27,7 +27,7 @@ def mainlist(item): anime = ['/lista-cartoni-animati-e-anime'] - docu = [('Documentari bullet bold',['/lista-documentari', 'peliculas', '', 'tvshow'])] + docu = [('Documentari {bullet bold}',['/lista-documentari', 'peliculas', '', 'tvshow'])] search = '' diff --git a/channels/serietvonline.py b/channels/serietvonline.py index f80927bf..adae9c91 100644 --- a/channels/serietvonline.py +++ b/channels/serietvonline.py @@ -51,7 +51,7 @@ def mainlist(item): anime = ['/lista-cartoni-animati-e-anime/'] - documentari = [('Documentari bullet bold', ['/lista-documentari/' , 'peliculas' , 'doc', 'tvshow'])] + documentari = [('Documentari {bullet bold}', ['/lista-documentari/' , 'peliculas' , 'doc', 'tvshow'])] search = '' diff --git a/channels/serietvsubita.py b/channels/serietvsubita.py index 47cb8850..a18fd5fa 100644 --- a/channels/serietvsubita.py +++ b/channels/serietvsubita.py @@ -25,8 +25,8 @@ def mainlist(item): log() itemlist = [] tvshowSub = [ - ('Novità bold',[ '', 'peliculas_tv', '', 'tvshow']), - ('Serie TV bold',[ '', 'lista_serie', '', 'tvshow']), + ('Novità {bold}',[ '', 'peliculas_tv', '', 'tvshow']), + ('Serie TV {bold}',[ '', 'lista_serie', '', 'tvshow']), ('Per Lettera', ['', 'list_az', 'serie', 'tvshow']) ] cerca = [(support.typo('Cerca...', 'bold'),[ '', 'search', '', 'tvshow'])] diff --git a/channels/vvvvid.py b/channels/vvvvid.py index 5a431604..8d686b0f 100644 --- a/channels/vvvvid.py +++ b/channels/vvvvid.py @@ -54,22 +54,22 @@ def mainlist(item): ('Generi',['series/', 'peliculas', 'channel/10004/last/?category=']), ('A-Z',['series/', 'peliculas', 'channel/10003/last/?filter=']) ] - show = [('Show bold {tv}',['show/', 'peliculas', '', 'tvshow']), - ('Popolari submenu {tv}',['show/', 'peliculas', 'channel/10002/last/', 'tvshow']), - ('Nuove Uscite submenu {tv}',['show/', 'peliculas', 'channel/10007/last/', 'tvshow']), - ('Generi submenu {tv}',['show/', 'peliculas', 'channel/10004/last/?category=', 'tvshow']), - ('A-Z submenu {tv}',['show/', 'peliculas', 'channel/10003/last/?filter=', 'tvshow']), - ('Cerca Show... bold submenu {tv}', ['show/', 'search', '', 'tvshow']) + show = [('Show {bold} {tv}',['show/', 'peliculas', '', 'tvshow']), + ('Popolari {submenu} {tv}',['show/', 'peliculas', 'channel/10002/last/', 'tvshow']), + ('Nuove Uscite {submenu} {tv}',['show/', 'peliculas', 'channel/10007/last/', 'tvshow']), + ('Generi {submenu} {tv}',['show/', 'peliculas', 'channel/10004/last/?category=', 'tvshow']), + ('A-Z {submenu} {tv}',['show/', 'peliculas', 'channel/10003/last/?filter=', 'tvshow']), + ('Cerca Show... {bold submenu} {tv}', ['show/', 'search', '', 'tvshow']) ] - kids = [('Kids bold',['kids/', 'peliculas', '', 'tvshow']), - ('Popolari submenu {kids}',['kids/', 'peliculas', 'channel/10002/last/', 'tvshow']), - ('Nuove Uscite submenu {kids}',['kids/', 'peliculas', 'channel/10007/last/', 'tvshow']), - ('Generi submenu {kids}',['kids/', 'peliculas', 'channel/10004/last/?category=', 'tvshow']), - ('A-Z submenu {kids}',['kids/', 'peliculas', 'channel/10003/last/?filter=', 'tvshow']), - ('Cerca Kids... bold submenu {kids}', ['kids/', 'search', '', 'tvshow']) + kids = [('Kids {bold}',['kids/', 'peliculas', '', 'tvshow']), + ('Popolari {submenu} {kids}',['kids/', 'peliculas', 'channel/10002/last/', 'tvshow']), + ('Nuove Uscite {submenu} {kids}',['kids/', 'peliculas', 'channel/10007/last/', 'tvshow']), + ('Generi {submenu} {kids}',['kids/', 'peliculas', 'channel/10004/last/?category=', 'tvshow']), + ('A-Z {submenu} {kids}',['kids/', 'peliculas', 'channel/10003/last/?filter=', 'tvshow']), + ('Cerca Kids... {bold submenu} {kids}', ['kids/', 'search', '', 'tvshow']) ] else: - Top = [("Visibile solo dall'Italia bold",[])] + Top = [("Visibile solo dall'Italia {bold}",[])] return locals() diff --git a/core/support.py b/core/support.py index 2f5b76f6..bce0ea0d 100755 --- a/core/support.py +++ b/core/support.py @@ -727,7 +727,7 @@ def menu(func): if not global_search: for sub, var in dictUrl['top']: menuItem(itemlist, filename, - title = sub + ' italic bold', + title = sub + '{italic bold}', url = host + var[0] if len(var) > 0 else '', action = var[1] if len(var) > 1 else 'peliculas', args=var[2] if len(var) > 2 else '', @@ -742,7 +742,7 @@ def menu(func): if not global_search: menuItem(itemlist, filename, - title + ' bullet bold', 'peliculas', + title + '{bullet bold}', 'peliculas', host + url, contentType='movie' if name == 'film' else 'tvshow') if len(dictUrl[name]) > 0: @@ -750,13 +750,13 @@ def menu(func): if dictUrl[name] is not None and type(dictUrl[name]) is not str: for sub, var in dictUrl[name]: menuItem(itemlist, filename, - title = sub + ' submenu {' + title + '}', + title = sub + '{submenu} {' + title + '}', url = host + var[0] if len(var) > 0 else '', action = var[1] if len(var) > 1 else 'peliculas', args=var[2] if len(var) > 2 else '', contentType= var[3] if len(var) > 3 else 'movie' if name == 'film' else 'tvshow') # add search menu for category - if 'search' not in args: menuItem(itemlist, filename, config.get_localized_string(70741) % title + ' … submenu bold', 'search', host + url, contentType='movie' if name == 'film' else 'tvshow', style=not global_search) + if 'search' not in args: menuItem(itemlist, filename, config.get_localized_string(70741) % title + '… {submenu bold}', 'search', host + url, contentType='movie' if name == 'film' else 'tvshow', style=not global_search) # Make EXTRA MENU (on bottom) if not global_search: @@ -774,7 +774,7 @@ def menu(func): contentType= var[3] if len(var) > 3 else 'movie',) if single_search: - menuItem(itemlist, filename, config.get_localized_string(70741) % '… bold', 'search', host + dictUrl['search'], style=not global_search) + menuItem(itemlist, filename, config.get_localized_string(70741) % '… {bold}', 'search', host + dictUrl['search'], style=not global_search) if not global_search: autoplay.init(item.channel, list_servers, list_quality) @@ -791,63 +791,58 @@ def menu(func): def typo(string, typography=''): - # string = string.strip() + kod_color = '0xFF65B3DA' #'0xFF0081C2' - # listTypo = ['capitalize', 'uppercase', 'lowercase', '[]', '()', 'submenu', 'bold', 'italic', '_', ''] try: string = str(string) except: string = str(string.encode('utf8')) - if typography: - string = string + ' ' + typography if config.get_localized_string(30992) in string: string = string + ' >' - # If there are no attributes, it applies the default ones - attribute = ['[]','()','submenu','color','bold','italic','_','--','[B]','[I]','[COLOR]'] if int(config.get_setting('view_mode_channel').split(',')[-1]) in [0, 50, 55]: VLT = True else: VLT = False - # Otherwise it uses the typographical attributes of the string - # else: - if 'capitalize' in string.lower(): - string = string.replace(' capitalize', '').capitalize() - if 'uppercase' in string.lower(): - string = string.replace(' uppercase', '').upper() - if 'lowercase' in string.lower(): - string = string.replace(' lowercase', '').lower() - if '[]' in string: - string = '[' + string.replace(' []', '').strip() + ']' - if '()' in string: - string = '(' + string.replace(' ()', '').strip() + ')' - if 'submenu' in string: - if VLT: - string = "•• " + string.replace(' submenu', '').strip() - else: - string = string.replace(' submenu', '') - if 'color kod' in string: - string = '[COLOR ' + kod_color + ']' + string.replace(' color kod', '') + '[/COLOR]' - if 'color' in string: - color = scrapertools.find_single_match(string, 'color ([a-z]+)') - string = '[COLOR ' + color + ']' + re.sub(r'\scolor\s([a-z]+)','',string) + '[/COLOR]' - if 'bold' in string: - string = '[B]' + string.replace(' bold', '').strip() + '[/B]' - if 'italic' in string: - string = '[I]' + string.replace(' italic', '').strip() + '[/I]' - if '_' in string: - string = ' ' + string.replace(' _', '').strip() - if '--' in string: - string = ' - ' + string.replace(' --', '').strip() - if 'bullet' in string: - if VLT: - string = '[B]' + "•" + '[/B] ' + string.replace(' bullet', '').strip() - else: - string = string.replace(' bullet', '').strip() - if '{}' in string: - string = string.replace(' {}', '').strip() - # string = string.strip() + + if not typography and '{' in string: + typography = string.split('{')[1].strip(' }').lower() + string = string.replace('{' + typography + '}','').strip() + else: + string = string.strip() + typography.lower() + + + if 'capitalize' in typography: + string = string.capitalize() + if 'uppercase' in typography: + string = string.upper() + if 'lowercase' in typography: + string = string.lower() + if '[]' in typography: + string = '[' + string + ']' + if '()' in typography: + string = '(' + string + ')' + if 'submenu' in typography: + if VLT: string = "•• " + string + else: string = string + if 'color kod' in typography: + string = '[COLOR ' + kod_color + ']' + string + '[/COLOR]' + elif 'color' in typography: + color = scrapertools.find_single_match(typography, 'color ([a-zA-Z0-9]+)') + string = '[COLOR ' + color + ']' + string + '[/COLOR]' + if 'bold' in typography: + string = '[B]' + string + '[/B]' + if 'italic' in typography: + string = '[I]' + string + '[/I]' + if '_' in typography: + string = ' ' + string + if '--' in typography: + string = ' - ' + string + if 'bullet' in typography: + if VLT: string = '[B]' + "•" + '[/B] ' + string + else: string = string return string