Add an additional, faster On Deck node for movies
This commit is contained in:
parent
0bf7ada6e3
commit
a463bd521f
2 changed files with 32 additions and 0 deletions
|
@ -1308,6 +1308,10 @@ msgctxt "#39501"
|
|||
msgid "Collections"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#39502"
|
||||
msgid "PKC On Deck (faster)"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#39600"
|
||||
msgid "Are you sure you want to reset your local Kodi database? A re-sync of the Plex data will take time afterwards."
|
||||
msgstr ""
|
||||
|
|
|
@ -28,6 +28,11 @@ NODE_TYPES = {
|
|||
},
|
||||
'movies',
|
||||
True),
|
||||
('pkc_ondeck',
|
||||
utils.lang(39502), # "PKC On Deck (faster)"
|
||||
{},
|
||||
'movies',
|
||||
False),
|
||||
('recent',
|
||||
utils.lang(30174), # "Recently Added"
|
||||
{
|
||||
|
@ -244,6 +249,29 @@ def node_pms(section, node_name, args):
|
|||
return xml
|
||||
|
||||
|
||||
def node_pkc_ondeck(section, node_name):
|
||||
"""
|
||||
For movies only - returns in-progress movies sorted by last played
|
||||
"""
|
||||
xml = etree.Element('node', attrib={'order': unicode(section.order),
|
||||
'type': 'filter'})
|
||||
etree.SubElement(xml, 'match').text = 'all'
|
||||
rule = etree.SubElement(xml, 'rule', attrib={'field': 'tag',
|
||||
'operator': 'is'})
|
||||
etree.SubElement(rule, 'value').text = section.name
|
||||
etree.SubElement(xml, 'rule', attrib={'field': 'inprogress',
|
||||
'operator': 'true'})
|
||||
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':
|
||||
'descending'}).text = 'lastplayed'
|
||||
return xml
|
||||
|
||||
|
||||
def node_recent(section, node_name):
|
||||
xml = etree.Element('node',
|
||||
attrib={'order': unicode(section.order),
|
||||
|
|
Loading…
Reference in a new issue