1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

Modify after review, issue 846

This commit is contained in:
dalgr 2018-03-06 19:47:14 +01:00 committed by Johan Andersson
parent f06c09e9c3
commit 4c62d87087

View File

@ -70,7 +70,7 @@ def templateelemt(element, filename, idnumber, offset_sec, duration_sec):
for n in selements:
time.append(int(n.attrib["d"]))
match = re.search("\$Time\$", name)
if rvalue and (match is not None) and (len(selements) < 3):
if rvalue and match and len(selements) < 3:
for n in range(start, start + total):
new = name.replace("$Time$", str(n * int(rvalue[0].attrib["d"])))
files.append(urljoin(filename, new))