parent
e917761ae3
commit
8860edd592
3 changed files with 11 additions and 11 deletions
|
@ -65,7 +65,6 @@ def set_excludefromscan_music_folders():
|
||||||
path = api.validatePlayurl(location.attrib['path'],
|
path = api.validatePlayurl(location.attrib['path'],
|
||||||
typus=v.PLEX_TYPE_ARTIST,
|
typus=v.PLEX_TYPE_ARTIST,
|
||||||
omitCheck=True)
|
omitCheck=True)
|
||||||
path = tryEncode(path)
|
|
||||||
paths.append(__turn_to_regex(path))
|
paths.append(__turn_to_regex(path))
|
||||||
# Get existing advancedsettings
|
# Get existing advancedsettings
|
||||||
root, tree = advancedsettings_xml(['audio', 'excludefromscan'],
|
root, tree = advancedsettings_xml(['audio', 'excludefromscan'],
|
||||||
|
@ -98,7 +97,7 @@ def set_excludefromscan_music_folders():
|
||||||
|
|
||||||
if write_xml is True:
|
if write_xml is True:
|
||||||
indent(tree.getroot())
|
indent(tree.getroot())
|
||||||
tree.write('%sadvancedsettings.xml' % v.KODI_PROFILE)
|
tree.write('%sadvancedsettings.xml' % v.KODI_PROFILE, encoding="UTF-8")
|
||||||
return changed
|
return changed
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -557,8 +557,8 @@ def __setXMLTag(element, tag, value, attrib=None):
|
||||||
If "subelement" does not exist, create it using attrib and value.
|
If "subelement" does not exist, create it using attrib and value.
|
||||||
|
|
||||||
element : etree element
|
element : etree element
|
||||||
tag : string/unicode for subelement
|
tag : unicode for subelement
|
||||||
value : string/unicode
|
value : unicode
|
||||||
attrib : dict; will use etree attrib method
|
attrib : dict; will use etree attrib method
|
||||||
|
|
||||||
Returns the subelement
|
Returns the subelement
|
||||||
|
@ -657,7 +657,7 @@ def advancedsettings_xml(node_list, new_value=None, attrib=None,
|
||||||
# Indent and make readable
|
# Indent and make readable
|
||||||
indent(root)
|
indent(root)
|
||||||
# Safe the changed xml
|
# Safe the changed xml
|
||||||
tree.write(path)
|
tree.write(path, encoding="UTF-8")
|
||||||
return element, tree
|
return element, tree
|
||||||
|
|
||||||
|
|
||||||
|
@ -705,7 +705,7 @@ def sourcesXML():
|
||||||
try:
|
try:
|
||||||
indent(root)
|
indent(root)
|
||||||
except: pass
|
except: pass
|
||||||
etree.ElementTree(root).write(xmlpath)
|
etree.ElementTree(root).write(xmlpath, encoding="UTF-8")
|
||||||
|
|
||||||
|
|
||||||
def passwordsXML():
|
def passwordsXML():
|
||||||
|
@ -749,7 +749,8 @@ def passwordsXML():
|
||||||
paths.remove(path)
|
paths.remove(path)
|
||||||
log.info("Successfully removed credentials for: %s"
|
log.info("Successfully removed credentials for: %s"
|
||||||
% credentials)
|
% credentials)
|
||||||
etree.ElementTree(root).write(xmlpath)
|
etree.ElementTree(root).write(xmlpath,
|
||||||
|
encoding="UTF-8")
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
log.error("Failed to find saved server: %s in passwords.xml"
|
log.error("Failed to find saved server: %s in passwords.xml"
|
||||||
|
@ -817,7 +818,7 @@ def passwordsXML():
|
||||||
indent(root)
|
indent(root)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
etree.ElementTree(root).write(xmlpath)
|
etree.ElementTree(root).write(xmlpath, encoding="UTF-8")
|
||||||
|
|
||||||
# dialog.notification(
|
# dialog.notification(
|
||||||
# heading="PlexKodiConnect",
|
# heading="PlexKodiConnect",
|
||||||
|
|
|
@ -120,7 +120,7 @@ class VideoNodes(object):
|
||||||
indent(root)
|
indent(root)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
etree.ElementTree(root).write(nodeXML)
|
etree.ElementTree(root).write(nodeXML, encoding="UTF-8")
|
||||||
|
|
||||||
nodetypes = {
|
nodetypes = {
|
||||||
'1': "all",
|
'1': "all",
|
||||||
|
@ -375,7 +375,7 @@ class VideoNodes(object):
|
||||||
indent(root)
|
indent(root)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
etree.ElementTree(root).write(nodeXML)
|
etree.ElementTree(root).write(nodeXML, encoding="UTF-8")
|
||||||
|
|
||||||
def singleNode(self, indexnumber, tagname, mediatype, itemtype):
|
def singleNode(self, indexnumber, tagname, mediatype, itemtype):
|
||||||
tagname = tryEncode(tagname)
|
tagname = tryEncode(tagname)
|
||||||
|
@ -431,7 +431,7 @@ class VideoNodes(object):
|
||||||
indent(root)
|
indent(root)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
etree.ElementTree(root).write(nodeXML)
|
etree.ElementTree(root).write(nodeXML, encoding="UTF-8")
|
||||||
|
|
||||||
def clearProperties(self):
|
def clearProperties(self):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue