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:
parent
4c858f173f
commit
979b8c43f7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user