From 3e1884176d4ac98006a4b264460e682963f06243 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 21 Mar 2020 19:44:08 -0400 Subject: [PATCH] Give xml files correct attributes --- jellyfin_kodi/views.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jellyfin_kodi/views.py b/jellyfin_kodi/views.py index b5e18ba6..eccba331 100644 --- a/jellyfin_kodi/views.py +++ b/jellyfin_kodi/views.py @@ -387,10 +387,8 @@ class Views(object): xml = etree.parse(file).getroot() xml.set('order', str(index)) else: - xml = self.node_root('filter', index) + xml = self.node_root('main', index) etree.SubElement(xml, 'label') - etree.SubElement(xml, 'match') - etree.SubElement(xml, 'content') except Exception as error: LOG.exception(error) xml = self.node_root('main', index) @@ -470,7 +468,7 @@ class Views(object): if os.path.isfile(file): xml = etree.parse(file).getroot() else: - xml = self.node_root('filter', index) + xml = self.node_root('folder', index) etree.SubElement(xml, 'label') etree.SubElement(xml, 'content') except Exception: @@ -479,6 +477,10 @@ class Views(object): etree.SubElement(xml, 'label') etree.SubElement(xml, 'content') + # Migration for https://github.com/jellyfin/jellyfin-kodi/issues/239 + if xml.attrib.get('type') == 'filter': + xml.attrib = {'type': 'folder', 'order': '5'} + label = xml.find('label') label.text = name