Adjust sources.xml

switch to adding only smb:// as suggested on forums
This commit is contained in:
angelblue05 2016-02-04 03:41:39 -06:00
parent 95ed199218
commit 6b00eb466e
1 changed files with 15 additions and 14 deletions

View File

@ -312,20 +312,21 @@ def sourcesXML():
etree.SubElement(video, 'default', attrib={'pathversion': "1"}) etree.SubElement(video, 'default', attrib={'pathversion': "1"})
# Add elements # Add elements
for i in range(1, 3): count = 2
for source in root.findall('.//path'):
for source in root.findall('.//path'): if source.text == "smb://":
if source.text == "smb://embydummy/dummypath%s/" % i: count -= 1
# Already there, skip
break if count == 0:
else: # sources already set
source = etree.SubElement(video, 'source') break
etree.SubElement(source, 'name').text = "Emby" else:
etree.SubElement(source, 'path', attrib={'pathversion': "1"}).text = ( # Missing smb:// occurences, re-add.
for i in range(0, count):
"smb://embydummy/dummypath%s/" % i source = etree.SubElement(video, 'source')
) etree.SubElement(source, 'name').text = "Emby"
etree.SubElement(source, 'allowsharing').text = "true" etree.SubElement(source, 'path', attrib={'pathversion': "1"}).text = "smb://"
etree.SubElement(source, 'allowsharing').text = "true"
# Prettify and write to file # Prettify and write to file
try: try:
indent(root) indent(root)