From 1c245683addc764c8f235c0ed50994d813e9558b Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 14 Jun 2019 12:38:01 +0200 Subject: [PATCH] Introduce limits to the number of videos shown in PKC widgets to speed them up --- resources/language/resource.language.en_gb/strings.po | 2 +- resources/lib/library_sync/nodes.py | 4 ++++ resources/settings.xml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index fc35632d..c85caabd 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -1058,7 +1058,7 @@ msgstr "" # PKC Settings - Appearance Tweaks 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 "" # PKC Settings - Plex diff --git a/resources/lib/library_sync/nodes.py b/resources/lib/library_sync/nodes.py index 369f37cb..82c32394 100644 --- a/resources/lib/library_sync/nodes.py +++ b/resources/lib/library_sync/nodes.py @@ -266,6 +266,7 @@ def node_recent(section, node_name): etree.SubElement(xml, 'label').text = node_name etree.SubElement(xml, 'icon').text = ICON_PATH etree.SubElement(xml, 'content').text = section.content + etree.SubElement(xml, 'limit').text = utils.settings('widgetLimit') etree.SubElement(xml, 'order', attrib={'direction': @@ -303,6 +304,7 @@ def node_recommended(section, node_name): etree.SubElement(xml, 'label').text = node_name etree.SubElement(xml, 'icon').text = ICON_PATH etree.SubElement(xml, 'content').text = section.content + etree.SubElement(xml, 'limit').text = utils.settings('widgetLimit') etree.SubElement(xml, 'order', attrib={'direction': @@ -357,6 +359,7 @@ def node_random(section, node_name): etree.SubElement(xml, 'label').text = node_name etree.SubElement(xml, 'icon').text = ICON_PATH etree.SubElement(xml, 'content').text = section.content + etree.SubElement(xml, 'limit').text = utils.settings('widgetLimit') etree.SubElement(xml, 'order', attrib={'direction': @@ -377,6 +380,7 @@ def node_lastplayed(section, node_name): etree.SubElement(xml, 'label').text = node_name etree.SubElement(xml, 'icon').text = ICON_PATH etree.SubElement(xml, 'content').text = section.content + etree.SubElement(xml, 'limit').text = utils.settings('widgetLimit') etree.SubElement(xml, 'order', attrib={'direction': diff --git a/resources/settings.xml b/resources/settings.xml index 79212504..68406395 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -158,6 +158,7 @@ +