Merge pull request #9 from kodiondemand/master

riorganizzazione
This commit is contained in:
greko
2019-05-23 19:00:39 +02:00
committed by GitHub
81 changed files with 1130 additions and 5372 deletions
+8 -8
View File
@@ -7,7 +7,7 @@ import urllib
from lib import unshortenit
from platformcode import logger, config
from channelselector import thumb
from channels import autoplay
from specials import autoplay
def hdpass_get_servers(item):
@@ -379,7 +379,8 @@ def menu(itemlist, title='', action='', url='', contentType='movie', args=[]):
def typo(string, typography=''):
kod_color = '0xFF0081C2'
kod_color = '0xFF65B3DA' #'0xFF0081C2'
# Check if the typographic attributes are in the string or outside
if typography:
@@ -388,7 +389,7 @@ def typo(string, typography=''):
string = string + ' >'
# If there are no attributes, it applies the default ones
attribute = ['[]','()','{}','submenu','color','bold','italic','_','[B]','[I]','[COLOR]']
attribute = ['[]','()','{}','submenu','color','bold','italic','_','--','[B]','[I]','[COLOR]']
movie_word_list = ['film', 'serie', 'tv', 'anime', 'cinema', 'sala']
search_word_list = ['cerca']
@@ -422,6 +423,8 @@ def typo(string, typography=''):
string = '[I]' + re.sub(r'\sitalic','',string) + '[/I]'
if '_' in string:
string = ' ' + re.sub(r'\s_','',string)
if '--' in string:
string = ' - ' + re.sub(r'\s--','',string)
return string
@@ -455,7 +458,7 @@ def videolibrary(itemlist, item, typography=''):
action = 'add_serie_to_library'
extra = 'episodios'
contentType = 'tvshow'
if not typography: typography = 'color kod bold'
title = typo(config.get_localized_string(30161) + ' ' + typography)
if inspect.stack()[1][3] == 'findvideos' and contentType == 'movie' or inspect.stack()[1][3] != 'findvideos' and contentType != 'movie':
if config.get_videolibrary_support() and len(itemlist) > 0:
@@ -500,11 +503,8 @@ def server(item, data='', headers='', AutoPlay=True, CheckLinks=True):
if not data:
data = httptools.downloadpage(item.url, headers=headers).data
## fix by greko
data = str(item.url)
## FINE fix by greko
itemlist = servertools.find_video_items(data=data)
itemlist = servertools.find_video_items(data=str(data))
for videoitem in itemlist:
videoitem.title = "".join([item.title, ' ', typo(videoitem.title, 'color kod []')])