Fix community per riscrittura render_items

This commit is contained in:
Alhaziel01
2020-04-01 20:12:43 +02:00
parent 9c9f8a8ad0
commit 42e717d035
+9 -18
View File
@@ -42,7 +42,7 @@ def show_channels(item):
itemlist = [] itemlist = []
# add context menu # add context menu
context = CONTEXT + [{"title": config.get_localized_string(50005), "action": "remove_channel", "channel": "community"}] context = [{"title": config.get_localized_string(50005), "action": "remove_channel", "channel": "community"}]
# read json # read json
json = load_and_check(item) json = load_and_check(item)
@@ -209,8 +209,7 @@ def peliculas(item, json='', key='', itemlist=[]):
fanart = extra.fanart, fanart = extra.fanart,
plot = extra.plot, plot = extra.plot,
personal_plot = extra.plot, personal_plot = extra.plot,
action = action, action = action)
context = CONTEXT)
itlist.append(it) itlist.append(it)
if not 'generic_list' in key: if not 'generic_list' in key:
@@ -249,8 +248,7 @@ def get_seasons(item):
contentSeason=option['season'], contentSeason=option['season'],
infoLabels=infoLabels, infoLabels=infoLabels,
contentType='season', contentType='season',
path=extra.path, path=extra.path))
context = CONTEXT))
if inspect.stack()[2][3] in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest'] or show_seasons == False: if inspect.stack()[2][3] in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest'] or show_seasons == False:
itlist = [] itlist = []
@@ -325,8 +323,7 @@ def episodios(item, json ='', key='', itemlist =[]):
contentEpisode = episode_number, contentEpisode = episode_number,
infoLabels = infoLabels, infoLabels = infoLabels,
contentType = 'episode', contentType = 'episode',
path = item.path, path = item.path))
context = CONTEXT))
# if showseason # if showseason
if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest', 'search']: if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest', 'search']:
@@ -348,8 +345,7 @@ def episodios(item, json ='', key='', itemlist =[]):
contentSeason=season, contentSeason=season,
infoLabels=infoLabels, infoLabels=infoLabels,
filterseason=str(season), filterseason=str(season),
path=item.path, path=item.path))
context = CONTEXT))
elif defpage and inspect.stack()[1][3] not in ['get_seasons']: elif defpage and inspect.stack()[1][3] not in ['get_seasons']:
if Pagination and len(itemlist) >= Pagination: if Pagination and len(itemlist) >= Pagination:
@@ -401,8 +397,7 @@ def get_menu(item, json, key, itemlist=[]):
action = 'show_menu', action = 'show_menu',
menu = level2 if not item.menu else None, menu = level2 if not item.menu else None,
filterkey = extra.filterkey, filterkey = extra.filterkey,
filter = extra.filter, filter = extra.filter)
context = CONTEXT)
if title: if title:
itemlist.append(it) itemlist.append(it)
@@ -444,7 +439,6 @@ def get_sub_menu(item, json, key, itemlist=[]):
action = 'show_menu', action = 'show_menu',
menu = level2 if not item.menu else None, menu = level2 if not item.menu else None,
filterkey = filterkey, filterkey = filterkey,
context = CONTEXT,
description = extra.description) description = extra.description)
itemlist.append(it) itemlist.append(it)
@@ -479,8 +473,7 @@ def get_search_menu(item, json='', itemlist=[], channel_name=''):
url=item.url, url=item.url,
custom_search=extra.url if extra.url != item.url else '', custom_search=extra.url if extra.url != item.url else '',
path=item.path, path=item.path,
global_search=True if channel_name else False, global_search=True if channel_name else False))
context = CONTEXT))
return itemlist return itemlist
@@ -578,8 +571,7 @@ def filter_thread(filter, key, item, description):
path=item.path, path=item.path,
filterkey=item.filterkey, filterkey=item.filterkey,
filter=filter, filter=filter,
key=key, key=key)
context = CONTEXT)
return item return item
@@ -743,8 +735,7 @@ def pagination(item, itemlist = []):
path=item.path, path=item.path,
media_type=item.media_type, media_type=item.media_type,
thumbnail=support.thumb(), thumbnail=support.thumb(),
itemlist= encoded_itemlist, itemlist= encoded_itemlist))
context = CONTEXT))
return itlist return itlist
def add_channel(item): def add_channel(item):