aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs2
-rw-r--r--MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs4
-rw-r--r--MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs14
-rw-r--r--RSSDP/HttpParserBase.cs6
-rw-r--r--RSSDP/HttpRequestParser.cs2
-rw-r--r--RSSDP/SsdpDevice.cs2
-rw-r--r--RSSDP/SsdpDeviceLocator.cs2
-rw-r--r--RSSDP/SsdpDevicePublisher.cs4
8 files changed, 36 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 8e0e63ff0..bf87c0336 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -2955,7 +2955,9 @@ namespace MediaBrowser.Controller.Entities
return ((IHasTrailers)this).LocalTrailerIds.Select(LibraryManager.GetItemById).Where(i => i != null).OrderBy(i => i.SortName);
}
else
+ {
return Array.Empty<BaseItem>();
+ }
}
public virtual bool IsHD => Height >= 720;
diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
index 190abaa05..3f21c2bd4 100644
--- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
+++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
@@ -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
+ }
}
}
}
diff --git a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs
index 52b486dc7..77033c6b4 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>";
}
}
diff --git a/RSSDP/HttpParserBase.cs b/RSSDP/HttpParserBase.cs
index 00c2b7b45..a40612bc2 100644
--- a/RSSDP/HttpParserBase.cs
+++ b/RSSDP/HttpParserBase.cs
@@ -140,7 +140,9 @@ namespace Rssdp.Infrastructure
lineIndex++;
}
else
+ {
break;
+ }
}
ParseHeader(line, headers, contentHeaders);
@@ -184,7 +186,9 @@ namespace Rssdp.Infrastructure
}
}
else
+ {
values.AddRange(segments);
+ }
}
return values;
@@ -218,7 +222,9 @@ namespace Rssdp.Infrastructure
return trimmedSegment.Substring(1, trimmedSegment.Length - 2);
}
else
+ {
return trimmedSegment;
+ }
}
}
}
diff --git a/RSSDP/HttpRequestParser.cs b/RSSDP/HttpRequestParser.cs
index 7fa42f466..4114195a6 100644
--- a/RSSDP/HttpRequestParser.cs
+++ b/RSSDP/HttpRequestParser.cs
@@ -70,7 +70,9 @@ namespace Rssdp.Infrastructure
message.RequestUri = requestUri;
}
else
+ {
System.Diagnostics.Debug.WriteLine(parts[1]);
+ }
if (parts.Length >= 3)
{
diff --git a/RSSDP/SsdpDevice.cs b/RSSDP/SsdpDevice.cs
index 7030c6ec1..4005d836d 100644
--- a/RSSDP/SsdpDevice.cs
+++ b/RSSDP/SsdpDevice.cs
@@ -169,7 +169,9 @@ namespace Rssdp
return "uuid:" + this.Uuid;
}
else
+ {
return _Udn;
+ }
}
set
diff --git a/RSSDP/SsdpDeviceLocator.cs b/RSSDP/SsdpDeviceLocator.cs
index 9a31db7a2..38562ce49 100644
--- a/RSSDP/SsdpDeviceLocator.cs
+++ b/RSSDP/SsdpDeviceLocator.cs
@@ -590,7 +590,9 @@ namespace Rssdp.Infrastructure
return OneSecond;
}
else
+ {
return searchWaitTime.Subtract(OneSecond);
+ }
}
private DiscoveredSsdpDevice FindExistingDeviceNotification(IEnumerable<DiscoveredSsdpDevice> devices, string notificationType, string usn)
diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs
index 7c6e87201..1a8577d8d 100644
--- a/RSSDP/SsdpDevicePublisher.cs
+++ b/RSSDP/SsdpDevicePublisher.cs
@@ -402,7 +402,9 @@ namespace Rssdp.Infrastructure
_RecentSearchRequests[newRequest.Key] = newRequest;
}
else
+ {
isDuplicateRequest = true;
+ }
}
else
{
@@ -613,7 +615,9 @@ namespace Rssdp.Infrastructure
WriteTrace(text + " " + device.DeviceType + " - " + device.Uuid + " - " + rootDevice.Location);
}
else
+ {
WriteTrace(text + " " + device.DeviceType + " - " + device.Uuid);
+ }
}
private void CommsServer_RequestReceived(object sender, RequestReceivedEventArgs e)