1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-30 15:14:14 +01:00

subtitle_sami: remove an extra space in the beginning

This commit is contained in:
Johan Andersson 2013-06-27 23:17:16 +02:00
parent 4c858f173f
commit 979b8c43f7

View File

@ -172,13 +172,16 @@ def subtitle_sami(options, data):
tree = ET.XML(data)
subt = tree.find("Font")
subs = ""
n = 0
for i in subt.getiterator():
if i.tag == "Subtitle":
if i.attrib["SpotNumber"] == 1:
n = i.attrib["SpotNumber"]
if i.attrib["SpotNumber"] == "1":
subs += "%s\n%s --> %s\n" % (i.attrib["SpotNumber"], i.attrib["TimeIn"], i.attrib["TimeOut"])
else:
subs += "\n%s\n%s --> %s\n" % (i.attrib["SpotNumber"], i.attrib["TimeIn"], i.attrib["TimeOut"])
else:
if n > 0:
subs += "%s\n" % i.text
filename = re.search(r"(.*)\.[a-z0-9]{2,3}$", options.output)