summaryrefslogblamecommitdiffstats
path: root/2020/subtitles/fix.py
blob: 5fc8fd4f41833f54e8a34aebdc6eade31a61d83c (plain) (tree)
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()