vtt2ass: Reverse line order for certain subtitles
Reverse line order for subtitles that happen within a deviation of 3 of different types than those we merge. Should address point 2 of #608
This commit is contained in:
parent
f1bb6c8a64
commit
4726bd0416
1 changed files with 4 additions and 0 deletions
|
|
@ -299,6 +299,10 @@ function convert(css: Css, vtt: Vtt[]) {
|
|||
events[x.type as keyof typeof events].pop();
|
||||
const previousLinePop = events[x.type as keyof typeof events].pop();
|
||||
events[x.type as keyof typeof events].push(previousLinePop + '\\N'+x.text);
|
||||
} else if ((currentStart - previousStart) <= 3) {
|
||||
const currentLinePop = events[x.type as keyof typeof events].pop();
|
||||
const previousLinePop = events[previousLine.type as keyof typeof events].pop();
|
||||
events[x.type as keyof typeof events].push(currentLinePop as string, previousLinePop as string);
|
||||
}
|
||||
}
|
||||
previousLine = x;
|
||||
|
|
|
|||
Loading…
Reference in a new issue