asticode / go-astisub

Manipulate subtitles in GO (.srt, .ssa/.ass, .stl, .ttml, .vtt (webvtt), teletext, etc.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The indexes always are zero (v0.26.1 only)

garytan0722 opened this issue · comments

Hi,
In version 0.26.1, the indexes for .srt or .vtt files consistently register as zero, whereas in version 0.26.0, the behavior is normal.
Here is simplified code and subtitle files:

s1, _ := astisub.OpenFile("test.srt")

for _, v := range s1.Items {
	fmt.Printf("Index: %d\n", v.Index)
}

I've pushed a fix on master and I've created a v0.26.2 tag, could you confirm it's working properly?

It works, thank for your help.