The Free Software Media System - Server Backend & API
Minor improvements
Bond_0094419587c2a08
diff --git a/Jellyfin.Drawing.Skia/SkiaEncoder.cs b/Jellyfin.Drawing.Skia/SkiaEncoder.csindex 2ea690650b..a67118f188 100644--- a/Jellyfin.Drawing.Skia/SkiaEncoder.cs+++ b/Jellyfin.Drawing.Skia/SkiaEncoder.cs@@ -308,8 +308,7 @@ namespace Jellyfin.Drawing.Skiaif (requiresTransparencyHack || forceCleanBitmap){- using (var stream = new SKFileStream(NormalizePath(path)))- using (var codec = SKCodec.Create(stream))+ using (var codec = SKCodec.Create(NormalizePath(path))){if (codec == null){diff --git a/MediaBrowser.Common/Net/HttpResponseInfo.cs b/MediaBrowser.Common/Net/HttpResponseInfo.csindex d7f7a56229..56a951ebf1 100644--- a/MediaBrowser.Common/Net/HttpResponseInfo.cs+++ b/MediaBrowser.Common/Net/HttpResponseInfo.cs@@ -22,7 +22,6 @@ namespace MediaBrowser.Common.Net}#pragma warning restore CS1591-#pragma warning restore SA1600/// <summary>/// Gets or sets the type of the content.diff --git a/MediaBrowser.Common/System/OperatingSystem.cs b/MediaBrowser.Common/System/OperatingSystem.csindex 7d38ddb6e5..5f673d3208 100644--- a/MediaBrowser.Common/System/OperatingSystem.cs+++ b/MediaBrowser.Common/System/OperatingSystem.cs@@ -35,7 +35,7 @@ namespace MediaBrowser.Common.Systemcase OperatingSystemId.Linux: return "Linux";case OperatingSystemId.Darwin: return "macOS";case OperatingSystemId.Windows: return "Windows";- default: throw new Exception($"Unknown OS {Id}");+ default: throw new PlatformNotSupportedException($"Unknown OS {Id}");}}}@@ -53,20 +53,20 @@ namespace MediaBrowser.Common.Systemdefault:{string osDescription = RuntimeInformation.OSDescription;- if (osDescription.IndexOf("linux", StringComparison.OrdinalIgnoreCase) != -1)+ if (osDescription.Contains("linux", StringComparison.OrdinalIgnoreCase)){return OperatingSystemId.Linux;}- else if (osDescription.IndexOf("darwin", StringComparison.OrdinalIgnoreCase) != -1)+ else if (osDescription.Contains("darwin", StringComparison.OrdinalIgnoreCase)){return OperatingSystemId.Darwin;}- else if (osDescription.IndexOf("bsd", StringComparison.OrdinalIgnoreCase) != -1)+ else if (osDescription.Contains("bsd", StringComparison.OrdinalIgnoreCase)){return OperatingSystemId.BSD;}- throw new Exception($"Can't resolve OS with description: '{osDescription}'");+ throw new PlatformNotSupportedException($"Can't resolve OS with description: '{osDescription}'");}}}