Merge pull request #837 from croneter/fix-lastplayed

Fix last-played node value to ensure a playcount greater than zero
This commit is contained in:
croneter 2019-04-21 10:06:20 +02:00 committed by GitHub
commit cc854a120f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -373,7 +373,7 @@ def node_lastplayed(section, node_name):
etree.SubElement(rule, 'value').text = section.name etree.SubElement(rule, 'value').text = section.name
rule = etree.SubElement(xml, 'rule', attrib={'field': 'playcount', rule = etree.SubElement(xml, 'rule', attrib={'field': 'playcount',
'operator': 'greaterthan'}) 'operator': 'greaterthan'})
etree.SubElement(rule, 'value').text = 0 etree.SubElement(rule, 'value').text = '0'
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