We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e17a27 commit 927952cCopy full SHA for 927952c
markut.go
@@ -312,10 +312,14 @@ func (context EvalContext) PrintSummary() error {
312
fmt.Printf(">>> YouTube Chapters (%d):\n", len(context.chapters))
313
maxLength := Millis(0);
314
for i, chapter := range context.chapters {
315
- if i > 0 {
316
- length := chapter.Timestamp - context.chapters[i - 1].Timestamp;
317
- maxLength = max(maxLength, length)
+ var length Millis;
+ if i + 1 < len(context.chapters) {
+ length = context.chapters[i + 1].Timestamp;
318
+ } else {
319
+ length = fullLength;
320
}
321
+ length -= chapter.Timestamp;
322
+ maxLength = max(maxLength, length)
323
324
locWidth = MaxChaptersLocWidthPlusOne(context.chapters)
325
0 commit comments