summaryrefslogtreecommitdiffstats
path: root/2020/subtitles/fix.py
blob: 37071b1a18b8c72f3e55b5740a9ca3b48b1691d5 (plain) (blame)
1
2
3
4
5
6
7
8
9
import webvtt
import sys
filename = sys.argv[1]
if (filename.find('sbv')):
    vtt = webvtt.from_sbv(filename)
length = len(vtt)
for I in range(0, length - 1):
    vtt[I].end = vtt[i + 1].start
vtt.save()