asticode / go-astisub

Manipulate subtitles in GO (.srt, .ssa/.ass, .stl, .ttml, .vtt (webvtt), teletext, etc.)
MIT License
577 stars 111 forks source link

Handle dot as well for SRT files #81

Closed HaWaiiO closed 1 year ago

HaWaiiO commented 1 year ago

For example, for the srt file from Lark:


1
00:00:01.230 --> 00:00:05.790
说话人 1: 用资讯唤醒每一天,欢迎收听财马早评

2
00:00:07.900 --> 00:00:11.220
说话人 2: 各位喜马拉雅才怕早评的听众朋友们大家早上好

3
00:00:11.220 --> 00:00:21.580
说话人 2:  2022 年的 12 月 26 号,今天是周一,本周是比较特殊的一周,本周交易结束到本周六

It's use dot "." instead of comma "," for duration, which fails in this package. Can you please add a fallback for this kind of SRT files?

asticode commented 1 year ago

It has been added to master.

You can close this issue if that fixes your problem 👍