mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
Ignores unexpected empty lines in subtitle format
This commit is contained in:
parent
8c19f96e46
commit
1d716d5963
@ -274,7 +274,9 @@ class subtitle(object):
|
||||
if n:
|
||||
itmes.append(n)
|
||||
else:
|
||||
if len(subs) > 1 and itmes[1] == subs[-1][1]: # This will happen when there is two sections in file
|
||||
if len(subs) > 1 and len(itmes) < 2: #Ignore empty lines in unexpected places
|
||||
pass
|
||||
elif len(subs) > 1 and itmes[1] == subs[-1][1]: # This will happen when there are two sections in file
|
||||
ha = strdate(subs[-1][0])
|
||||
ha3 = strdate(itmes[0])
|
||||
second = str2sec(ha3.group(2)) + time
|
||||
|
Loading…
Reference in New Issue
Block a user