mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 17:14:42 +01:00
subtitle parsing fixes
This commit is contained in:
@@ -43,10 +43,11 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
subEvent.StartPositionTicks = GetTicks(sections[headers["Start"]]);
|
||||
subEvent.EndPositionTicks = GetTicks(sections[headers["End"]]);
|
||||
|
||||
//RemoteNativeFormatting(subEvent);
|
||||
|
||||
subEvent.Text = string.Join(",", sections.Skip(headers["Text"]));
|
||||
subEvent.Text = subEvent.Text.Replace(@"\N", ParserValues.NewLine, StringComparison.OrdinalIgnoreCase);
|
||||
RemoteNativeFormatting(subEvent);
|
||||
|
||||
subEvent.Text = subEvent.Text.Replace("\\n", ParserValues.NewLine, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
subEvent.Text = Regex.Replace(subEvent.Text, @"\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}", string.Empty, RegexOptions.IgnoreCase);
|
||||
|
||||
trackInfo.TrackEvents.Add(subEvent);
|
||||
|
||||
@@ -148,8 +148,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
|
||||
public static string GetFormattedText(string text)
|
||||
{
|
||||
text = text.Replace("\\n", ParserValues.NewLine, StringComparison.OrdinalIgnoreCase)
|
||||
.Replace("\\n", ParserValues.NewLine, StringComparison.OrdinalIgnoreCase);
|
||||
text = text.Replace("\\n", ParserValues.NewLine, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
bool italic = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user