mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Adjust sources.xml
switch to adding only smb:// as suggested on forums
This commit is contained in:
parent
95ed199218
commit
6b00eb466e
1 changed files with 15 additions and 14 deletions
|
@ -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'):
|
||||||
|
if source.text == "smb://":
|
||||||
|
count -= 1
|
||||||
|
|
||||||
for source in root.findall('.//path'):
|
if count == 0:
|
||||||
if source.text == "smb://embydummy/dummypath%s/" % i:
|
# sources already set
|
||||||
# Already there, skip
|
break
|
||||||
break
|
else:
|
||||||
else:
|
# Missing smb:// occurences, re-add.
|
||||||
source = etree.SubElement(video, 'source')
|
for i in range(0, count):
|
||||||
etree.SubElement(source, 'name').text = "Emby"
|
source = etree.SubElement(video, 'source')
|
||||||
etree.SubElement(source, 'path', attrib={'pathversion': "1"}).text = (
|
etree.SubElement(source, 'name').text = "Emby"
|
||||||
|
etree.SubElement(source, 'path', attrib={'pathversion': "1"}).text = "smb://"
|
||||||
"smb://embydummy/dummypath%s/" % i
|
etree.SubElement(source, 'allowsharing').text = "true"
|
||||||
)
|
|
||||||
etree.SubElement(source, 'allowsharing').text = "true"
|
|
||||||
# Prettify and write to file
|
# Prettify and write to file
|
||||||
try:
|
try:
|
||||||
indent(root)
|
indent(root)
|
||||||
|
|
Loading…
Reference in a new issue