diff options
| author | Bond_009 <bond.009@outlook.com> | 2020-12-28 15:43:55 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-12-28 15:43:55 +0100 |
| commit | 5ac36a8b5859d5416005ab411774aa9464a533d2 (patch) | |
| tree | 6c99f480609aae8c0de5abfd6273089645853a96 /MediaBrowser.MediaEncoding | |
| parent | 2913e2604c3a0fd36cf4d4f6d74a65289be187d5 (diff) | |
Add tests for srt parser
Diffstat (limited to 'MediaBrowser.MediaEncoding')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs index cc35efb3f..4a87f87dc 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs @@ -69,7 +69,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles var multiline = new List<string>(); while ((line = reader.ReadLine()) != null) { - if (string.IsNullOrEmpty(line)) + if (line.Length == 0) { break; } @@ -87,7 +87,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles } } - trackInfo.TrackEvents = trackEvents.ToArray(); + trackInfo.TrackEvents = trackEvents; return trackInfo; } |
