diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-08-04 17:08:09 +0200 |
|---|---|---|
| committer | Bond-009 <bond.009@outlook.com> | 2020-08-04 17:08:09 +0200 |
| commit | 53f99d5d4bdf3f2f5b65d53f9d84f1ea220e58e7 (patch) | |
| tree | 92ffebaef5068ff0606d0d40edf23e7e2f64400d /MediaBrowser.MediaEncoding/Subtitles/AssParser.cs | |
| parent | 18efa25a6fdcfab2326cb35bb5781138a83e9d56 (diff) | |
Add some analyzers to MediaBrowser.MediaEncoding
Diffstat (limited to 'MediaBrowser.MediaEncoding/Subtitles/AssParser.cs')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Subtitles/AssParser.cs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs index e6e21756a..308b62886 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs @@ -25,7 +25,8 @@ namespace MediaBrowser.MediaEncoding.Subtitles { string line; while (reader.ReadLine() != "[Events]") - { } + { + } var headers = ParseFieldHeaders(reader.ReadLine()); @@ -75,17 +76,14 @@ namespace MediaBrowser.MediaEncoding.Subtitles { var fields = line.Substring(8).Split(',').Select(x => x.Trim()).ToList(); - var result = new Dictionary<string, int> { - {"Start", fields.IndexOf("Start")}, - {"End", fields.IndexOf("End")}, - {"Text", fields.IndexOf("Text")} - }; - return result; + return new Dictionary<string, int> + { + { "Start", fields.IndexOf("Start") }, + { "End", fields.IndexOf("End") }, + { "Text", fields.IndexOf("Text") } + }; } - /// <summary> - /// Credit: https://github.com/SubtitleEdit/subtitleedit/blob/master/src/Logic/SubtitleFormats/AdvancedSubStationAlpha.cs - /// </summary> private void RemoteNativeFormatting(SubtitleTrackEvent p) { int indexOfBegin = p.Text.IndexOf('{'); |
