Fix successivo in novità
This commit is contained in:
@@ -87,6 +87,7 @@ def newest(category):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
item = support.Item()
|
item = support.Item()
|
||||||
item.args = 1
|
item.args = 1
|
||||||
|
item.newest = True
|
||||||
if category == 'peliculas':
|
if category == 'peliculas':
|
||||||
item.url = host + '/film'
|
item.url = host + '/film'
|
||||||
else:
|
else:
|
||||||
@@ -147,10 +148,11 @@ def peliculas(item):
|
|||||||
recordlist.append(it)
|
recordlist.append(it)
|
||||||
|
|
||||||
itemlist.sort(key=lambda item: item.n)
|
itemlist.sort(key=lambda item: item.n)
|
||||||
if recordlist:
|
if not item.newest:
|
||||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), page=page, records=recordlist))
|
if recordlist:
|
||||||
elif len(itemlist) >= 20:
|
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), page=page, records=recordlist))
|
||||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), records=[], page=page + 1))
|
elif len(itemlist) >= 20:
|
||||||
|
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), records=[], page=page + 1))
|
||||||
|
|
||||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
support.check_trakt(itemlist)
|
support.check_trakt(itemlist)
|
||||||
|
|||||||
+18
-16
@@ -90,6 +90,7 @@ def search(item, text):
|
|||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
item = support.Item()
|
item = support.Item()
|
||||||
item.args = 'channel/10007/last/'
|
item.args = 'channel/10007/last/'
|
||||||
|
item.newest = True
|
||||||
if categoria == 'peliculas':
|
if categoria == 'peliculas':
|
||||||
item.contentType = 'movie'
|
item.contentType = 'movie'
|
||||||
item.url = main_host + 'film/'
|
item.url = main_host + 'film/'
|
||||||
@@ -133,24 +134,25 @@ def peliculas(item):
|
|||||||
make_itemlist(itemlist, item, json_file)
|
make_itemlist(itemlist, item, json_file)
|
||||||
|
|
||||||
itlist = []
|
itlist = []
|
||||||
for i, it in enumerate(itemlist):
|
if not item.newest:
|
||||||
if pagination and (item.page - 1) * pagination > i: continue # pagination
|
for i, it in enumerate(itemlist):
|
||||||
if pagination and i >= item.page * pagination: break # pagination
|
if pagination and (item.page - 1) * pagination > i: continue # pagination
|
||||||
|
if pagination and i >= item.page * pagination: break # pagination
|
||||||
|
|
||||||
itlist.append(it)
|
itlist.append(it)
|
||||||
|
|
||||||
if pagination and len(itemlist) >= pagination:
|
if pagination and len(itemlist) >= pagination:
|
||||||
if inspect.stack()[1][3] != 'get_newest':
|
if inspect.stack()[1][3] != 'get_newest':
|
||||||
itlist.append(
|
itlist.append(
|
||||||
item.clone(action='peliculas',
|
item.clone(action='peliculas',
|
||||||
title=support.typo(config.get_localized_string(30992), 'color kod bold'),
|
title=support.typo(config.get_localized_string(30992), 'color kod bold'),
|
||||||
fulltitle=item.fulltitle,
|
fulltitle=item.fulltitle,
|
||||||
show=item.show,
|
show=item.show,
|
||||||
url=item.url,
|
url=item.url,
|
||||||
args=item.args,
|
args=item.args,
|
||||||
page=item.page + 1,
|
page=item.page + 1,
|
||||||
thumbnail=support.thumb()))
|
thumbnail=support.thumb()))
|
||||||
itemlist = itlist
|
itemlist = itlist
|
||||||
|
|
||||||
if 'category' in item.args:
|
if 'category' in item.args:
|
||||||
support.thumb(itemlist,genre=True)
|
support.thumb(itemlist,genre=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user