Fix successivo in novità

This commit is contained in:
Alhaziel01
2021-12-22 19:04:37 +01:00
parent d682cd7886
commit 8ce21e8e10
2 changed files with 24 additions and 20 deletions

View File

@@ -87,6 +87,7 @@ def newest(category):
itemlist = []
item = support.Item()
item.args = 1
item.newest = True
if category == 'peliculas':
item.url = host + '/film'
else:
@@ -147,6 +148,7 @@ def peliculas(item):
recordlist.append(it)
itemlist.sort(key=lambda item: item.n)
if not item.newest:
if recordlist:
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), page=page, records=recordlist))
elif len(itemlist) >= 20:

View File

@@ -90,6 +90,7 @@ def search(item, text):
def newest(categoria):
item = support.Item()
item.args = 'channel/10007/last/'
item.newest = True
if categoria == 'peliculas':
item.contentType = 'movie'
item.url = main_host + 'film/'
@@ -133,6 +134,7 @@ def peliculas(item):
make_itemlist(itemlist, item, json_file)
itlist = []
if not item.newest:
for i, it in enumerate(itemlist):
if pagination and (item.page - 1) * pagination > i: continue # pagination
if pagination and i >= item.page * pagination: break # pagination