FIxed the test used to decide whether to display a 'Next' button or not.

This commit is contained in:
Cyrille Bollu 2018-07-31 10:43:17 +02:00
parent d41c770f41
commit 382de6d954
1 changed files with 4 additions and 4 deletions

View File

@ -110,10 +110,10 @@ class PeertubeAddon():
listing.append((url, list_item, False))
# Insert a 'Next' button when there are more videos to list
if data['total'] > ( int(start) + 1 ) * self.items_per_page:
start = int(start) + self.items_per_page
list_item = xbmcgui.ListItem(label='Next')
url = '{0}?action=browse&start={1}'.format(self.plugin_url, str(start))
start = int(start) + self.items_per_page
if data['total'] > start:
list_item = xbmcgui.ListItem(label='Next page ({0})'.format(start/self.items_per_page)
url = '{0}?action=browse&start={1}'.format(self.plugin_url, start)
listing.append((url, list_item, True))
return listing