From 5cc67f41e1da0ee27f7806347935db1c9848d732 Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 14 Apr 2019 14:41:14 +0200 Subject: [PATCH] Reenable setting: recently added: don't show watched episodes --- resources/lib/library_sync/nodes.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/lib/library_sync/nodes.py b/resources/lib/library_sync/nodes.py index 0203e964..c90992f3 100644 --- a/resources/lib/library_sync/nodes.py +++ b/resources/lib/library_sync/nodes.py @@ -252,6 +252,13 @@ def node_recent(section, node_name): rule = etree.SubElement(xml, 'rule', attrib={'field': 'tag', 'operator': 'is'}) etree.SubElement(rule, 'value').text = section.name + if (section.section_type == v.PLEX_TYPE_SHOW and + utils.settings('TVShowWatched') == 'false'): + # Adds an additional rule if user deactivated the PKC setting + # "Recently Added: Also show already watched episodes" + rule = etree.SubElement(xml, 'rule', attrib={'field': 'playcount', + 'operator': 'is'}) + etree.SubElement(rule, 'value').text = '0' etree.SubElement(xml, 'label').text = node_name etree.SubElement(xml, 'icon').text = ICON_PATH etree.SubElement(xml, 'content').text = section.content