Introduce limits to the number of videos shown in PKC widgets to speed them up

This commit is contained in:
croneter 2019-06-14 12:38:01 +02:00
parent fde67483f4
commit 1c245683ad
3 changed files with 6 additions and 1 deletions

View file

@ -1058,7 +1058,7 @@ msgstr ""
# PKC Settings - Appearance Tweaks # PKC Settings - Appearance Tweaks
msgctxt "#39077" msgctxt "#39077"
msgid "Number of PMS items to show in widgets (e.g. \"On Deck\")" msgid "Maximum number of videos to show in widgets"
msgstr "" msgstr ""
# PKC Settings - Plex # PKC Settings - Plex

View file

@ -266,6 +266,7 @@ def node_recent(section, node_name):
etree.SubElement(xml, 'label').text = node_name etree.SubElement(xml, 'label').text = node_name
etree.SubElement(xml, 'icon').text = ICON_PATH etree.SubElement(xml, 'icon').text = ICON_PATH
etree.SubElement(xml, 'content').text = section.content etree.SubElement(xml, 'content').text = section.content
etree.SubElement(xml, 'limit').text = utils.settings('widgetLimit')
etree.SubElement(xml, etree.SubElement(xml,
'order', 'order',
attrib={'direction': attrib={'direction':
@ -303,6 +304,7 @@ def node_recommended(section, node_name):
etree.SubElement(xml, 'label').text = node_name etree.SubElement(xml, 'label').text = node_name
etree.SubElement(xml, 'icon').text = ICON_PATH etree.SubElement(xml, 'icon').text = ICON_PATH
etree.SubElement(xml, 'content').text = section.content etree.SubElement(xml, 'content').text = section.content
etree.SubElement(xml, 'limit').text = utils.settings('widgetLimit')
etree.SubElement(xml, etree.SubElement(xml,
'order', 'order',
attrib={'direction': attrib={'direction':
@ -357,6 +359,7 @@ def node_random(section, node_name):
etree.SubElement(xml, 'label').text = node_name etree.SubElement(xml, 'label').text = node_name
etree.SubElement(xml, 'icon').text = ICON_PATH etree.SubElement(xml, 'icon').text = ICON_PATH
etree.SubElement(xml, 'content').text = section.content etree.SubElement(xml, 'content').text = section.content
etree.SubElement(xml, 'limit').text = utils.settings('widgetLimit')
etree.SubElement(xml, etree.SubElement(xml,
'order', 'order',
attrib={'direction': attrib={'direction':
@ -377,6 +380,7 @@ def node_lastplayed(section, node_name):
etree.SubElement(xml, 'label').text = node_name etree.SubElement(xml, 'label').text = node_name
etree.SubElement(xml, 'icon').text = ICON_PATH etree.SubElement(xml, 'icon').text = ICON_PATH
etree.SubElement(xml, 'content').text = section.content etree.SubElement(xml, 'content').text = section.content
etree.SubElement(xml, 'limit').text = utils.settings('widgetLimit')
etree.SubElement(xml, etree.SubElement(xml,
'order', 'order',
attrib={'direction': attrib={'direction':

View file

@ -158,6 +158,7 @@
<category label="39073"><!-- Appearance Tweaks --> <category label="39073"><!-- Appearance Tweaks -->
<setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 39085][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=refreshplaylist)" option="close" /><!-- Reload Kodi node files to apply all the settings below --> <setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 39085][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=refreshplaylist)" option="close" /><!-- Reload Kodi node files to apply all the settings below -->
<setting id="widgetLimit" type="slider" label="39077" default="30" range="10,10,100" option="int" /><!-- Maximum number of videos to show in widgets -->
<setting type="lsep" /> <setting type="lsep" />
<setting id="fetch_pms_item_number" label="39077" type="number" default="50" option="int" visible="false" /> <setting id="fetch_pms_item_number" label="39077" type="number" default="50" option="int" visible="false" />
<setting type="lsep" label="39074" /><!-- TV Shows --> <setting type="lsep" label="39074" /><!-- TV Shows -->