mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-27 02:56:54 +01:00
brace multiline if statements (cont.)
This commit is contained in:
@@ -1384,14 +1384,18 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
description = string.Join(" ", numbers, 1, numbers.Length - 1).Trim(); // Skip the first, concatenate the rest, clean up spaces and save it
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(); // Switch to default parsing
|
||||
}
|
||||
}
|
||||
catch // Default parsing
|
||||
{
|
||||
if (subtitle.Contains(".")) // skip the comment, keep the subtitle
|
||||
description = string.Join(".", subtitle.Split('.'), 1, subtitle.Split('.').Length - 1).Trim(); // skip the first
|
||||
else
|
||||
{
|
||||
description = subtitle.Trim(); // Clean up whitespaces and save it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user