aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs
diff options
context:
space:
mode:
authortelans <telans@protonmail.com>2020-06-20 21:19:16 +1200
committertelans <telans@protonmail.com>2020-06-20 21:19:16 +1200
commit6556bec646a28d08267f30640125865cf42240d0 (patch)
tree55e9c9102f67e11ac0225c25166c2e4caaf012eb /MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs
parent5bb639a59a9ab4c42804e364c94b34aaca594796 (diff)
brace multiline if statements (cont.)
Diffstat (limited to 'MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs')
-rw-r--r--MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs
index 52b486dc7e..77033c6b44 100644
--- a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs
+++ b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs
@@ -207,7 +207,9 @@ namespace MediaBrowser.MediaEncoding.Subtitles
text = text.Insert(start, "<font face=\"" + fontName + "\"" + extraTags + "><i>");
}
else
+ {
text = text.Insert(start, "<font face=\"" + fontName + "\"" + extraTags + ">");
+ }
int indexOfEndTag = text.IndexOf("{\\fn}", start);
if (indexOfEndTag > 0)
@@ -215,7 +217,9 @@ namespace MediaBrowser.MediaEncoding.Subtitles
text = text.Remove(indexOfEndTag, "{\\fn}".Length).Insert(indexOfEndTag, "</font>");
}
else
+ {
text += "</font>";
+ }
}
}
@@ -236,7 +240,9 @@ namespace MediaBrowser.MediaEncoding.Subtitles
text = text.Insert(start, "<font size=\"" + fontSize + "\"" + extraTags + "><i>");
}
else
+ {
text = text.Insert(start, "<font size=\"" + fontSize + "\"" + extraTags + ">");
+ }
int indexOfEndTag = text.IndexOf("{\\fs}", start);
if (indexOfEndTag > 0)
@@ -244,7 +250,9 @@ namespace MediaBrowser.MediaEncoding.Subtitles
text = text.Remove(indexOfEndTag, "{\\fs}".Length).Insert(indexOfEndTag, "</font>");
}
else
+ {
text += "</font>";
+ }
}
}
}
@@ -272,14 +280,18 @@ namespace MediaBrowser.MediaEncoding.Subtitles
text = text.Insert(start, "<font color=\"" + color + "\"" + extraTags + "><i>");
}
else
+ {
text = text.Insert(start, "<font color=\"" + color + "\"" + extraTags + ">");
+ }
int indexOfEndTag = text.IndexOf("{\\c}", start);
if (indexOfEndTag > 0)
{
text = text.Remove(indexOfEndTag, "{\\c}".Length).Insert(indexOfEndTag, "</font>");
}
else
+ {
text += "</font>";
+ }
}
}
@@ -306,7 +318,9 @@ namespace MediaBrowser.MediaEncoding.Subtitles
text = text.Insert(start, "<font color=\"" + color + "\"" + extraTags + "><i>");
}
else
+ {
text = text.Insert(start, "<font color=\"" + color + "\"" + extraTags + ">");
+ }
text += "</font>";
}
}