diff --git a/resources/lib/helper/xmls.py b/resources/lib/helper/xmls.py index 1614ca47..18d4367c 100644 --- a/resources/lib/helper/xmls.py +++ b/resources/lib/helper/xmls.py @@ -52,7 +52,10 @@ def sources(): etree.SubElement(source, 'allowsharing').text = "true" try: - files = xml.find('files') or etree.SubElement(xml, 'files') + files = xml.find('files') + + if not files: + files = etree.SubElement(xml, 'files') for source in xml.findall('.//path'): if source.text == 'http://kodi.emby.media':