Merge branch 'master' of github.com:kodiondemand/addon
This commit is contained in:
@@ -44,11 +44,25 @@ def config_item(item):
|
||||
tvdb.find_and_set_infoLabels(item)
|
||||
data = ''
|
||||
data = add_season(data)
|
||||
if not item.infoLabels['tvdb_id']:
|
||||
heading = 'TVDB ID'
|
||||
item.infoLabels['tvdb_id'] = platformtools.dialog_numeric(0, heading)
|
||||
title = item.show
|
||||
count = 0
|
||||
|
||||
while not item.infoLabels['tvdb_id']:
|
||||
try:
|
||||
item.show = platformtools.dialog_input(default=item.show, heading=config.get_localized_string(30112))
|
||||
tvdb.find_and_set_infoLabels(item)
|
||||
count = count + 1
|
||||
except:
|
||||
heading = config.get_localized_string(70704)
|
||||
item.infoLabels['tvdb_id'] = platformtools.dialog_numeric(0, heading)
|
||||
data.append(item.infoLabels['tvdb_id'])
|
||||
write_data(item.from_channel, item.show, data)
|
||||
if item.infoLabels['tvdb_id'] != 0:
|
||||
write_data(item.from_channel, title, data)
|
||||
else:
|
||||
message = config.get_localized_string(60444)
|
||||
heading = item.show.strip()
|
||||
platformtools.dialog_notification(heading, message)
|
||||
|
||||
|
||||
|
||||
def add_season(data=None):
|
||||
@@ -59,6 +73,7 @@ def add_season(data=None):
|
||||
if season != "":
|
||||
heading = config.get_localized_string(70687)
|
||||
episode = platformtools.dialog_numeric(0, heading)
|
||||
|
||||
if episode == "0":
|
||||
heading = config.get_localized_string(70688)
|
||||
special = platformtools.dialog_numeric(0, heading)
|
||||
@@ -92,6 +107,8 @@ def write_data(channel, show, data):
|
||||
heading = show.strip()
|
||||
platformtools.dialog_notification(heading, message)
|
||||
|
||||
|
||||
|
||||
def renumber(itemlist, item='', typography=''):
|
||||
log()
|
||||
|
||||
@@ -118,7 +135,7 @@ def renumber(itemlist, item='', typography=''):
|
||||
if E == 0:
|
||||
epList.append([0, SP])
|
||||
E = 1
|
||||
if episodes['airedEpisodeNumber'] >= E:
|
||||
if episodes['airedEpisodeNumber'] >= E or episodes['airedSeason'] > S:
|
||||
epList.append([episodes['airedSeason'], episodes['airedEpisodeNumber']])
|
||||
page = page + 1
|
||||
else:
|
||||
|
||||
+7
-7
@@ -372,7 +372,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:
|
||||
@@ -381,7 +382,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']
|
||||
@@ -415,6 +416,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
|
||||
|
||||
@@ -448,7 +451,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:
|
||||
@@ -493,11 +496,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 []')])
|
||||
|
||||
+151
-167
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user