From 0cacd3ee87516b0183feaf89c8bb57117701ec7d Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Thu, 7 May 2015 10:33:35 +0200 Subject: [PATCH] minor detail changed --- resources/lib/VideoNodes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/lib/VideoNodes.py b/resources/lib/VideoNodes.py index 33c7136d..7654d843 100644 --- a/resources/lib/VideoNodes.py +++ b/resources/lib/VideoNodes.py @@ -10,6 +10,7 @@ import xbmcvfs import json import os import shutil +#import common elementree because cElementree has issues with kodi import xml.etree.ElementTree as etree import Utils as utils @@ -37,7 +38,10 @@ class VideoNodes(): etree.SubElement(root, "icon").text = "special://home/addons/plugin.video.emby/icon.png" path = "library://video/Emby - %s/"%tagname WINDOW.setProperty("Emby.nodes.%s.index" %str(windowPropId),path) - etree.ElementTree(root).write(nodefile) + try: + etree.ElementTree(root).write(nodefile, xml_declaration=True) + except: + etree.ElementTree(root).write(nodefile) #create tag node - all items nodefile = os.path.join(libraryPath, tagname + "_all.xml")