ripose-jp / Memento

An mpv-based video player for studying Japanese
https://ripose-jp.github.io/Memento/
GNU General Public License v2.0
488 stars 22 forks source link

Newline in srt causes subtitle list to disappear #69

Closed Arboco closed 2 years ago

Arboco commented 2 years ago

Having any newline between appearing text like this:

9
00:02:03,130 --> 00:02:06,100
帝国軍

中央の第4艦隊を撃破

Causes everything to disappear in the subtitle list like this: image

Removing any such line breaks fixes the error. I have only seen subtitles for old anime have this formatting error. If this is behavior due to faulty srt files then consider this a non issue.

ripose-jp commented 2 years ago

It is a bug that no subtitles would appear in the list in the case that subtitle parsing failed, but it was already fixed with 93f7d9a5403ce9fa92fd7d5c80edd085664c26f2 a few days ago. The fix will make it into the next version.

Having blank lines inside of subtitle text isn't allowed in SRT subtitles, but mpv/ffmpeg is fairly permissive in what it will accept. I won't implement it into Memento's subtitle parser just because it will make implementing SRT parsing harder than it needs to be since it requires look-ahead.

ripose-jp commented 2 years ago

I've released v0.5.4-1 which specifically addresses this issue.