Added an items_per_page setting to allow user to specify the number of videos

she wants to display per page.
Functionality not implemented yet though.
This commit is contained in:
Famille Bollu 2018-07-28 13:44:57 +02:00
parent 8f1749b8ef
commit 9351feff80
3 changed files with 14 additions and 4 deletions

View File

@ -35,14 +35,18 @@ class PeertubeAddon():
"""
xbmc.log('PeertubeAddon: Initialising', xbmc.LOGDEBUG)
addon = xbmc.Addon()
# Select preferred instance by default
self.selected_inst = addon.getSetting('preferred_instance')
# Get the number of videos to show per page
self.items_per_page = addon.getSetting('items_per_page')
# Nothing to play at initialisation
self.play = 0
self.torrent_name = ''
# Select preferred instance by default
addon = xbmc.Addon()
self.selected_inst = addon.getSetting('preferred_instance')
return None

View File

@ -17,7 +17,12 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
# Settings (from 30000 to 30019)
msgctxt "#30000"
msgid "Preferred instance"
msgstr ""
msgctxt "#30001"
msgid "Number of videos to show per page"
msgstr ""

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<setting id="preferred_instance" type="text" default="https://framatube.org" label="30000"/>
<setting id="items_per_page" type="select" default="20" values="10|20|50|100" label="30001"/>
</settings>