2
0
Эх сурвалжийг харах

Merge branch 'master' into mediabrowser-controller-entities

Rich Lander 3 жил өмнө
parent
commit
3e0aab390a
56 өөрчлөгдсөн 202 нэмэгдсэн , 106 устгасан
  1. 1 1
      .ci/azure-pipelines-abi.yml
  2. 1 1
      .ci/azure-pipelines-main.yml
  3. 1 1
      .ci/azure-pipelines-test.yml
  4. 1 1
      .ci/azure-pipelines.yml
  5. 8 5
      Emby.Dlna/Main/DlnaEntryPoint.cs
  6. 5 12
      Emby.Server.Implementations/ApplicationHost.cs
  7. 3 4
      Emby.Server.Implementations/IO/ManagedFileSystem.cs
  8. 2 2
      Emby.Server.Implementations/Localization/Core/sl-SI.json
  9. 1 1
      Jellyfin.Api/Controllers/DynamicHlsController.cs
  10. 1 2
      Jellyfin.Api/Controllers/VideoHlsController.cs
  11. 1 2
      Jellyfin.Api/Helpers/HlsHelpers.cs
  12. 4 4
      Jellyfin.Server/Program.cs
  13. 6 6
      MediaBrowser.Controller/Channels/Channel.cs
  14. 1 1
      MediaBrowser.Controller/Channels/ChannelItemInfo.cs
  15. 1 1
      MediaBrowser.Controller/Channels/ChannelItemResult.cs
  16. 1 1
      MediaBrowser.Controller/Channels/IHasFolderAttributes.cs
  17. 1 1
      MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
  18. 2 0
      MediaBrowser.Controller/Chapters/IChapterManager.cs
  19. 1 1
      MediaBrowser.Controller/Collections/CollectionCreationOptions.cs
  20. 1 0
      MediaBrowser.Controller/Collections/ICollectionManager.cs
  21. 9 0
      MediaBrowser.Controller/Drawing/IImageEncoder.cs
  22. 1 1
      MediaBrowser.Controller/Drawing/ImageStream.cs
  23. 1 0
      MediaBrowser.Controller/Dto/IDtoService.cs
  24. 8 9
      MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
  25. 1 1
      MediaBrowser.Controller/Providers/AlbumInfo.cs
  26. 1 1
      MediaBrowser.Controller/Providers/ArtistInfo.cs
  27. 1 1
      MediaBrowser.Controller/Providers/EpisodeInfo.cs
  28. 1 1
      MediaBrowser.Controller/Providers/IDirectoryService.cs
  29. 15 0
      MediaBrowser.Controller/Providers/IProviderManager.cs
  30. 10 10
      MediaBrowser.Controller/Providers/ImageRefreshOptions.cs
  31. 1 1
      MediaBrowser.Controller/Providers/ItemLookupInfo.cs
  32. 1 1
      MediaBrowser.Controller/Providers/MetadataRefreshOptions.cs
  33. 1 1
      MediaBrowser.Controller/Providers/MetadataResult.cs
  34. 1 1
      MediaBrowser.Controller/Providers/SeasonInfo.cs
  35. 6 6
      MediaBrowser.Controller/Providers/SongInfo.cs
  36. 0 2
      MediaBrowser.Controller/Security/IAuthenticationRepository.cs
  37. 1 1
      MediaBrowser.Model/Entities/MediaStream.cs
  38. 2 0
      MediaBrowser.Model/Properties/AssemblyInfo.cs
  39. 1 1
      tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj
  40. 1 1
      tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj
  41. 1 1
      tests/Jellyfin.Controller.Tests/Jellyfin.Controller.Tests.csproj
  42. 1 1
      tests/Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj
  43. 1 1
      tests/Jellyfin.Extensions.Tests/Jellyfin.Extensions.Tests.csproj
  44. 1 1
      tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj
  45. 76 0
      tests/Jellyfin.Model.Tests/Entities/MediaStreamTests.cs
  46. 1 1
      tests/Jellyfin.Model.Tests/Jellyfin.Model.Tests.csproj
  47. 1 1
      tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj
  48. 1 1
      tests/Jellyfin.Networking.Tests/Jellyfin.Networking.Tests.csproj
  49. 1 1
      tests/Jellyfin.Providers.Tests/Jellyfin.Providers.Tests.csproj
  50. 3 3
      tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs
  51. 1 1
      tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj
  52. 1 1
      tests/Jellyfin.Server.Integration.Tests/Jellyfin.Server.Integration.Tests.csproj
  53. 1 1
      tests/Jellyfin.Server.Tests/Jellyfin.Server.Tests.csproj
  54. 1 1
      tests/Jellyfin.XbmcMetadata.Tests/Jellyfin.XbmcMetadata.Tests.csproj
  55. 4 4
      tests/Jellyfin.XbmcMetadata.Tests/Location/MovieNfoLocationTests.cs
  56. 1 1
      tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs

+ 1 - 1
.ci/azure-pipelines-abi.yml

@@ -7,7 +7,7 @@ parameters:
   default: "ubuntu-latest"
 - name: DotNetSdkVersion
   type: string
-  default: 5.0.103
+  default: 5.0.302
 
 jobs:
   - job: CompatibilityCheck

+ 1 - 1
.ci/azure-pipelines-main.yml

@@ -1,7 +1,7 @@
 parameters:
   LinuxImage: 'ubuntu-latest'
   RestoreBuildProjects: 'Jellyfin.Server/Jellyfin.Server.csproj'
-  DotNetSdkVersion: 5.0.103
+  DotNetSdkVersion: 5.0.302
 
 jobs:
   - job: Build

+ 1 - 1
.ci/azure-pipelines-test.yml

@@ -10,7 +10,7 @@ parameters:
   default: "tests/**/*Tests.csproj"
 - name: DotNetSdkVersion
   type: string
-  default: 5.0.103
+  default: 5.0.302
 
 jobs:
   - job: Test

+ 1 - 1
.ci/azure-pipelines.yml

@@ -6,7 +6,7 @@ variables:
 - name: RestoreBuildProjects
   value: 'Jellyfin.Server/Jellyfin.Server.csproj'
 - name: DotNetSdkVersion
-  value: 5.0.103
+  value: 5.0.302
 
 pr:
   autoCancel: true

+ 8 - 5
Emby.Dlna/Main/DlnaEntryPoint.cs

@@ -27,11 +27,9 @@ using MediaBrowser.Controller.TV;
 using MediaBrowser.Model.Dlna;
 using MediaBrowser.Model.Globalization;
 using MediaBrowser.Model.Net;
-using MediaBrowser.Model.System;
 using Microsoft.Extensions.Logging;
 using Rssdp;
 using Rssdp.Infrastructure;
-using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;
 
 namespace Emby.Dlna.Main
 {
@@ -204,8 +202,8 @@ namespace Emby.Dlna.Main
             {
                 if (_communicationsServer == null)
                 {
-                    var enableMultiSocketBinding = OperatingSystem.Id == OperatingSystemId.Windows ||
-                                                   OperatingSystem.Id == OperatingSystemId.Linux;
+                    var enableMultiSocketBinding = OperatingSystem.IsWindows() ||
+                                                   OperatingSystem.IsLinux();
 
                     _communicationsServer = new SsdpCommunicationsServer(_socketFactory, _networkManager, _logger, enableMultiSocketBinding)
                     {
@@ -268,7 +266,12 @@ namespace Emby.Dlna.Main
 
             try
             {
-                _publisher = new SsdpDevicePublisher(_communicationsServer, _networkManager, OperatingSystem.Name, Environment.OSVersion.VersionString, _config.GetDlnaConfiguration().SendOnlyMatchedHost)
+                _publisher = new SsdpDevicePublisher(
+                    _communicationsServer,
+                    _networkManager,
+                    MediaBrowser.Common.System.OperatingSystem.Name,
+                    Environment.OSVersion.VersionString,
+                    _config.GetDlnaConfiguration().SendOnlyMatchedHost)
                 {
                     LogFunction = LogMessage,
                     SupportPnpRootDevice = false

+ 5 - 12
Emby.Server.Implementations/ApplicationHost.cs

@@ -103,7 +103,6 @@ using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Logging;
 using Prometheus.DotNetRuntime;
-using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;
 using WebSocketManager = Emby.Server.Implementations.HttpServer.WebSocketManager;
 
 namespace Emby.Server.Implementations
@@ -150,13 +149,7 @@ namespace Emby.Server.Implementations
                     return false;
                 }
 
-                if (OperatingSystem.Id == OperatingSystemId.Windows
-                    || OperatingSystem.Id == OperatingSystemId.Darwin)
-                {
-                    return true;
-                }
-
-                return false;
+                return OperatingSystem.IsWindows() || OperatingSystem.IsMacOS();
             }
         }
 
@@ -721,7 +714,7 @@ namespace Emby.Server.Implementations
 
             logger.LogInformation("Environment Variables: {EnvVars}", relevantEnvVars);
             logger.LogInformation("Arguments: {Args}", commandLineArgs);
-            logger.LogInformation("Operating system: {OS}", OperatingSystem.Name);
+            logger.LogInformation("Operating system: {OS}", MediaBrowser.Common.System.OperatingSystem.Name);
             logger.LogInformation("Architecture: {Architecture}", RuntimeInformation.OSArchitecture);
             logger.LogInformation("64-Bit Process: {Is64Bit}", Environment.Is64BitProcess);
             logger.LogInformation("User Interactive: {IsUserInteractive}", Environment.UserInteractive);
@@ -1098,8 +1091,8 @@ namespace Emby.Server.Implementations
                 ItemsByNamePath = ApplicationPaths.InternalMetadataPath,
                 InternalMetadataPath = ApplicationPaths.InternalMetadataPath,
                 CachePath = ApplicationPaths.CachePath,
-                OperatingSystem = OperatingSystem.Id.ToString(),
-                OperatingSystemDisplayName = OperatingSystem.Name,
+                OperatingSystem = MediaBrowser.Common.System.OperatingSystem.Id.ToString(),
+                OperatingSystemDisplayName = MediaBrowser.Common.System.OperatingSystem.Name,
                 CanSelfRestart = CanSelfRestart,
                 CanLaunchWebBrowser = CanLaunchWebBrowser,
                 TranscodingTempPath = ConfigurationManager.GetTranscodePath(),
@@ -1124,7 +1117,7 @@ namespace Emby.Server.Implementations
                 Version = ApplicationVersionString,
                 ProductName = ApplicationProductName,
                 Id = SystemId,
-                OperatingSystem = OperatingSystem.Id.ToString(),
+                OperatingSystem = MediaBrowser.Common.System.OperatingSystem.Id.ToString(),
                 ServerName = FriendlyName,
                 LocalAddress = GetSmartApiUrl(address),
                 StartupWizardCompleted = ConfigurationManager.CommonConfiguration.IsStartupWizardCompleted

+ 3 - 4
Emby.Server.Implementations/IO/ManagedFileSystem.cs

@@ -11,7 +11,6 @@ using MediaBrowser.Common.Configuration;
 using MediaBrowser.Model.IO;
 using MediaBrowser.Model.System;
 using Microsoft.Extensions.Logging;
-using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;
 
 namespace Emby.Server.Implementations.IO
 {
@@ -24,7 +23,7 @@ namespace Emby.Server.Implementations.IO
 
         private readonly List<IShortcutHandler> _shortcutHandlers = new List<IShortcutHandler>();
         private readonly string _tempPath;
-        private static readonly bool _isEnvironmentCaseInsensitive = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
+        private static readonly bool _isEnvironmentCaseInsensitive = OperatingSystem.IsWindows();
 
         public ManagedFileSystem(
             ILogger<ManagedFileSystem> logger,
@@ -402,7 +401,7 @@ namespace Emby.Server.Implementations.IO
 
         public virtual void SetHidden(string path, bool isHidden)
         {
-            if (OperatingSystem.Id != OperatingSystemId.Windows)
+            if (!OperatingSystem.IsWindows())
             {
                 return;
             }
@@ -426,7 +425,7 @@ namespace Emby.Server.Implementations.IO
 
         public virtual void SetAttributes(string path, bool isHidden, bool isReadOnly)
         {
-            if (OperatingSystem.Id != OperatingSystemId.Windows)
+            if (!OperatingSystem.IsWindows())
             {
                 return;
             }

+ 2 - 2
Emby.Server.Implementations/Localization/Core/sl-SI.json

@@ -16,7 +16,7 @@
     "Folders": "Mape",
     "Genres": "Zvrsti",
     "HeaderAlbumArtists": "Izvajalci albuma",
-    "HeaderContinueWatching": "Nadaljuj z ogledom",
+    "HeaderContinueWatching": "Nadaljuj ogled",
     "HeaderFavoriteAlbums": "Priljubljeni albumi",
     "HeaderFavoriteArtists": "Priljubljeni izvajalci",
     "HeaderFavoriteEpisodes": "Priljubljene epizode",
@@ -90,7 +90,7 @@
     "UserStartedPlayingItemWithValues": "{0} predvaja {1} na {2}",
     "UserStoppedPlayingItemWithValues": "{0} je nehal predvajati {1} na {2}",
     "ValueHasBeenAddedToLibrary": "{0} je bil dodan vaši knjižnici",
-    "ValueSpecialEpisodeName": "Posebna - {0}",
+    "ValueSpecialEpisodeName": "Bonus - {0}",
     "VersionNumber": "Različica {0}",
     "TaskDownloadMissingSubtitles": "Prenesi manjkajoče podnapise",
     "TaskRefreshChannelsDescription": "Osveži podatke spletnih kanalov.",

+ 1 - 1
Jellyfin.Api/Controllers/DynamicHlsController.cs

@@ -1380,7 +1380,7 @@ namespace Jellyfin.Api.Controllers
             }
             else if (string.Equals(segmentFormat, "mp4", StringComparison.OrdinalIgnoreCase))
             {
-                var outputFmp4HeaderArg = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) switch
+                var outputFmp4HeaderArg = OperatingSystem.IsWindows() switch
                 {
                     // on Windows, the path of fmp4 header file needs to be configured
                     true => " -hls_fmp4_init_filename \"" + outputPrefix + "-1" + outputExtension + "\"",

+ 1 - 2
Jellyfin.Api/Controllers/VideoHlsController.cs

@@ -366,8 +366,7 @@ namespace Jellyfin.Api.Controllers
             else if (string.Equals(segmentFormat, "mp4", StringComparison.OrdinalIgnoreCase))
             {
                 var outputFmp4HeaderArg = string.Empty;
-                var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
-                if (isWindows)
+                if (OperatingSystem.IsWindows())
                 {
                     // on Windows, the path of fmp4 header file needs to be configured
                     outputFmp4HeaderArg = " -hls_fmp4_init_filename \"" + outputPrefix + "-1" + outputExtension + "\"";

+ 1 - 2
Jellyfin.Api/Helpers/HlsHelpers.cs

@@ -99,8 +99,7 @@ namespace Jellyfin.Api.Helpers
                 return fmp4InitFileName;
             }
 
-            var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
-            if (isWindows)
+            if (OperatingSystem.IsWindows())
             {
                 // on Windows
                 // #EXT-X-MAP:URI="X:\transcodes\prefix-1.mp4"

+ 4 - 4
Jellyfin.Server/Program.cs

@@ -318,8 +318,8 @@ namespace Jellyfin.Server
                         }
                     }
 
-                    // Bind to unix socket (only on macOS and Linux)
-                    if (startupConfig.UseUnixSocket() && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+                    // Bind to unix socket (only on unix systems)
+                    if (startupConfig.UseUnixSocket() && Environment.OSVersion.Platform == PlatformID.Unix)
                     {
                         var socketPath = startupConfig.GetUnixSocketPath();
                         if (string.IsNullOrEmpty(socketPath))
@@ -404,7 +404,7 @@ namespace Jellyfin.Server
                 {
                     if (options.DataDir != null
                         || Directory.Exists(Path.Combine(dataDir, "config"))
-                        || RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+                        || OperatingSystem.IsWindows())
                     {
                         // Hang config folder off already set dataDir
                         configDir = Path.Combine(dataDir, "config");
@@ -442,7 +442,7 @@ namespace Jellyfin.Server
 
                 if (string.IsNullOrEmpty(cacheDir))
                 {
-                    if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+                    if (OperatingSystem.IsWindows())
                     {
                         // Hang cache folder off already set dataDir
                         cacheDir = Path.Combine(dataDir, "cache");

+ 6 - 6
MediaBrowser.Controller/Channels/Channel.cs

@@ -17,6 +17,12 @@ namespace MediaBrowser.Controller.Channels
 {
     public class Channel : Folder
     {
+        [JsonIgnore]
+        public override bool SupportsInheritedParentImages => false;
+
+        [JsonIgnore]
+        public override SourceType SourceType => SourceType.Channel;
+
         public override bool IsVisible(User user)
         {
             var blockedChannelsPreference = user.GetPreferenceValues<Guid>(PreferenceKind.BlockedChannels);
@@ -39,12 +45,6 @@ namespace MediaBrowser.Controller.Channels
             return base.IsVisible(user);
         }
 
-        [JsonIgnore]
-        public override bool SupportsInheritedParentImages => false;
-
-        [JsonIgnore]
-        public override SourceType SourceType => SourceType.Channel;
-
         protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
         {
             try

+ 1 - 1
MediaBrowser.Controller/Channels/ChannelItemInfo.cs

@@ -1,6 +1,6 @@
 #nullable disable
 
-#pragma warning disable CS1591
+#pragma warning disable CA1002, CA2227, CS1591
 
 using System;
 using System.Collections.Generic;

+ 1 - 1
MediaBrowser.Controller/Channels/ChannelItemResult.cs

@@ -1,6 +1,6 @@
 #nullable disable
 
-#pragma warning disable CS1591
+#pragma warning disable CA1002, CA2227, CS1591
 
 using System.Collections.Generic;
 

+ 1 - 1
MediaBrowser.Controller/Channels/IHasFolderAttributes.cs

@@ -1,4 +1,4 @@
-#pragma warning disable CS1591
+#pragma warning disable CA1819, CS1591
 
 namespace MediaBrowser.Controller.Channels
 {

+ 1 - 1
MediaBrowser.Controller/Channels/InternalChannelFeatures.cs

@@ -1,6 +1,6 @@
 #nullable disable
 
-#pragma warning disable CS1591
+#pragma warning disable CA1002, CA2227, CS1591
 
 using System.Collections.Generic;
 using MediaBrowser.Model.Channels;

+ 2 - 0
MediaBrowser.Controller/Chapters/IChapterManager.cs

@@ -12,6 +12,8 @@ namespace MediaBrowser.Controller.Chapters
         /// <summary>
         /// Saves the chapters.
         /// </summary>
+        /// <param name="itemId">The item.</param>
+        /// <param name="chapters">The set of chapters.</param>
         void SaveChapters(Guid itemId, IReadOnlyList<ChapterInfo> chapters);
     }
 }

+ 1 - 1
MediaBrowser.Controller/Collections/CollectionCreationOptions.cs

@@ -1,6 +1,6 @@
 #nullable disable
 
-#pragma warning disable CS1591
+#pragma warning disable CA2227, CS1591
 
 using System;
 using System.Collections.Generic;

+ 1 - 0
MediaBrowser.Controller/Collections/ICollectionManager.cs

@@ -32,6 +32,7 @@ namespace MediaBrowser.Controller.Collections
         /// Creates the collection.
         /// </summary>
         /// <param name="options">The options.</param>
+        /// <returns>BoxSet wrapped in an awaitable task.</returns>
         Task<BoxSet> CreateCollectionAsync(CollectionCreationOptions options);
 
         /// <summary>

+ 9 - 0
MediaBrowser.Controller/Drawing/IImageEncoder.cs

@@ -57,6 +57,15 @@ namespace MediaBrowser.Controller.Drawing
         /// <summary>
         /// Encode an image.
         /// </summary>
+        /// <param name="inputPath">Input path of image.</param>
+        /// <param name="dateModified">Date modified.</param>
+        /// <param name="outputPath">Output path of image.</param>
+        /// <param name="autoOrient">Auto-orient image.</param>
+        /// <param name="orientation">Desired orientation of image.</param>
+        /// <param name="quality">Quality of encoded image.</param>
+        /// <param name="options">Image processing options.</param>
+        /// <param name="outputFormat">Image format of output.</param>
+        /// <returns>Path of encoded image.</returns>
         string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat outputFormat);
 
         /// <summary>

+ 1 - 1
MediaBrowser.Controller/Drawing/ImageStream.cs

@@ -1,4 +1,4 @@
-#pragma warning disable CS1591
+#pragma warning disable CA1711, CS1591
 
 using System;
 using System.IO;

+ 1 - 0
MediaBrowser.Controller/Dto/IDtoService.cs

@@ -1,4 +1,5 @@
 #nullable disable
+#pragma warning disable CA1002
 
 using System.Collections.Generic;
 using Jellyfin.Data.Entities;

+ 8 - 9
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

@@ -143,8 +143,7 @@ namespace MediaBrowser.Controller.MediaEncoding
             }
 
             // Hybrid VPP tonemapping for QSV with VAAPI
-            var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
-            if (isLinux && string.Equals(options.HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase))
+            if (OperatingSystem.IsLinux() && string.Equals(options.HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase))
             {
                 // Limited to HEVC for now since the filter doesn't accept master data from VP9.
                 return IsColorDepth10(state)
@@ -503,9 +502,9 @@ namespace MediaBrowser.Controller.MediaEncoding
             var isQsvEncoder = outputVideoCodec.IndexOf("qsv", StringComparison.OrdinalIgnoreCase) != -1;
             var isNvdecDecoder = videoDecoder.Contains("cuda", StringComparison.OrdinalIgnoreCase);
             var isCuvidHevcDecoder = videoDecoder.Contains("hevc_cuvid", StringComparison.OrdinalIgnoreCase);
-            var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
-            var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
-            var isMacOS = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
+            var isWindows = OperatingSystem.IsWindows();
+            var isLinux = OperatingSystem.IsLinux();
+            var isMacOS = OperatingSystem.IsMacOS();
             var isTonemappingSupported = IsTonemappingSupported(state, encodingOptions);
             var isVppTonemappingSupported = IsVppTonemappingSupported(state, encodingOptions);
 
@@ -1983,7 +1982,7 @@ namespace MediaBrowser.Controller.MediaEncoding
 
             var videoSizeParam = string.Empty;
             var videoDecoder = GetHardwareAcceleratedVideoDecoder(state, options) ?? string.Empty;
-            var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
+            var isLinux = OperatingSystem.IsLinux();
 
             var isVaapiDecoder = videoDecoder.IndexOf("vaapi", StringComparison.OrdinalIgnoreCase) != -1;
             var isVaapiH264Encoder = outputVideoCodec.IndexOf("h264_vaapi", StringComparison.OrdinalIgnoreCase) != -1;
@@ -2528,7 +2527,7 @@ namespace MediaBrowser.Controller.MediaEncoding
             var isCuvidHevcDecoder = videoDecoder.Contains("hevc_cuvid", StringComparison.OrdinalIgnoreCase);
             var isLibX264Encoder = outputVideoCodec.IndexOf("libx264", StringComparison.OrdinalIgnoreCase) != -1;
             var isLibX265Encoder = outputVideoCodec.IndexOf("libx265", StringComparison.OrdinalIgnoreCase) != -1;
-            var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
+            var isLinux = OperatingSystem.IsLinux();
             var isColorDepth10 = IsColorDepth10(state);
             var isTonemappingSupported = IsTonemappingSupported(state, options);
             var isVppTonemappingSupported = IsVppTonemappingSupported(state, options);
@@ -3572,8 +3571,8 @@ namespace MediaBrowser.Controller.MediaEncoding
         /// </summary>
         public string GetHwaccelType(EncodingJobInfo state, EncodingOptions options, string videoCodec, bool isColorDepth10)
         {
-            var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
-            var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
+            var isWindows = OperatingSystem.IsWindows();
+            var isLinux = OperatingSystem.IsLinux();
             var isWindows8orLater = Environment.OSVersion.Version.Major > 6 || (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor > 1);
             var isDxvaSupported = _mediaEncoder.SupportsHwaccel("dxva2") || _mediaEncoder.SupportsHwaccel("d3d11va");
             var isCodecAvailable = options.HardwareDecodingCodecs.Contains(videoCodec, StringComparer.OrdinalIgnoreCase);

+ 1 - 1
MediaBrowser.Controller/Providers/AlbumInfo.cs

@@ -1,4 +1,4 @@
-#pragma warning disable CS1591
+#pragma warning disable CA1002, CA2227, CS1591
 
 using System;
 using System.Collections.Generic;

+ 1 - 1
MediaBrowser.Controller/Providers/ArtistInfo.cs

@@ -1,4 +1,4 @@
-#pragma warning disable CS1591
+#pragma warning disable CA1002, CA2227, CS1591
 
 using System.Collections.Generic;
 

+ 1 - 1
MediaBrowser.Controller/Providers/EpisodeInfo.cs

@@ -1,6 +1,6 @@
 #nullable disable
 
-#pragma warning disable CS1591
+#pragma warning disable CA2227, CS1591
 
 using System;
 using System.Collections.Generic;

+ 1 - 1
MediaBrowser.Controller/Providers/IDirectoryService.cs

@@ -1,4 +1,4 @@
-#pragma warning disable CA1819, CS1591
+#pragma warning disable CA1002, CA1819, CS1591
 
 using System.Collections.Generic;
 using MediaBrowser.Model.IO;

+ 15 - 0
MediaBrowser.Controller/Providers/IProviderManager.cs

@@ -31,6 +31,9 @@ namespace MediaBrowser.Controller.Providers
         /// <summary>
         /// Queues the refresh.
         /// </summary>
+        /// <param name="itemId">Item ID.</param>
+        /// <param name="options">MetadataRefreshOptions for operation.</param>
+        /// <param name="priority">RefreshPriority for operation.</param>
         void QueueRefresh(Guid itemId, MetadataRefreshOptions options, RefreshPriority priority);
 
         /// <summary>
@@ -85,6 +88,13 @@ namespace MediaBrowser.Controller.Providers
         /// <summary>
         /// Saves the image.
         /// </summary>
+        /// <param name="item">Image to save.</param>
+        /// <param name="source">Source of image.</param>
+        /// <param name="mimeType">Mime type image.</param>
+        /// <param name="type">Type of image.</param>
+        /// <param name="imageIndex">Index of image.</param>
+        /// <param name="saveLocallyWithMedia">Option to save locally.</param>
+        /// <param name="cancellationToken">CancellationToken to use with operation.</param>
         /// <returns>Task.</returns>
         Task SaveImage(BaseItem item, string source, string mimeType, ImageType type, int? imageIndex, bool? saveLocallyWithMedia, CancellationToken cancellationToken);
 
@@ -93,6 +103,11 @@ namespace MediaBrowser.Controller.Providers
         /// <summary>
         /// Adds the metadata providers.
         /// </summary>
+        /// <param name="imageProviders">Image providers to use.</param>
+        /// <param name="metadataServices">Metadata services to use.</param>
+        /// <param name="metadataProviders">Metadata providers to use.</param>
+        /// <param name="metadataSavers">Metadata savers to use.</param>
+        /// <param name="externalIds">External IDs to use.</param>
         void AddParts(
             IEnumerable<IImageProvider> imageProviders,
             IEnumerable<IMetadataService> metadataServices,

+ 10 - 10
MediaBrowser.Controller/Providers/ImageRefreshOptions.cs

@@ -1,6 +1,6 @@
 #nullable disable
 
-#pragma warning disable CS1591
+#pragma warning disable CA1819, CS1591
 
 using System;
 using System.Linq;
@@ -10,6 +10,15 @@ namespace MediaBrowser.Controller.Providers
 {
     public class ImageRefreshOptions
     {
+        public ImageRefreshOptions(IDirectoryService directoryService)
+        {
+            ImageRefreshMode = MetadataRefreshMode.Default;
+            DirectoryService = directoryService;
+
+            ReplaceImages = Array.Empty<ImageType>();
+            IsAutomated = true;
+        }
+
         public MetadataRefreshMode ImageRefreshMode { get; set; }
 
         public IDirectoryService DirectoryService { get; private set; }
@@ -20,15 +29,6 @@ namespace MediaBrowser.Controller.Providers
 
         public bool IsAutomated { get; set; }
 
-        public ImageRefreshOptions(IDirectoryService directoryService)
-        {
-            ImageRefreshMode = MetadataRefreshMode.Default;
-            DirectoryService = directoryService;
-
-            ReplaceImages = Array.Empty<ImageType>();
-            IsAutomated = true;
-        }
-
         public bool IsReplacingImage(ImageType type)
         {
             return ImageRefreshMode == MetadataRefreshMode.FullRefresh &&

+ 1 - 1
MediaBrowser.Controller/Providers/ItemLookupInfo.cs

@@ -1,6 +1,6 @@
 #nullable disable
 
-#pragma warning disable CS1591
+#pragma warning disable CA2227, CS1591
 
 using System;
 using System.Collections.Generic;

+ 1 - 1
MediaBrowser.Controller/Providers/MetadataRefreshOptions.cs

@@ -1,6 +1,6 @@
 #nullable disable
 
-#pragma warning disable CS1591
+#pragma warning disable CA1819, CS1591
 
 using System;
 using System.Linq;

+ 1 - 1
MediaBrowser.Controller/Providers/MetadataResult.cs

@@ -1,6 +1,6 @@
 #nullable disable
 
-#pragma warning disable CS1591
+#pragma warning disable CA1002, CA2227, CS1591
 
 using System;
 using System.Collections.Generic;

+ 1 - 1
MediaBrowser.Controller/Providers/SeasonInfo.cs

@@ -1,4 +1,4 @@
-#pragma warning disable CS1591
+#pragma warning disable CA2227, CS1591
 
 using System;
 using System.Collections.Generic;

+ 6 - 6
MediaBrowser.Controller/Providers/SongInfo.cs

@@ -9,16 +9,16 @@ namespace MediaBrowser.Controller.Providers
 {
     public class SongInfo : ItemLookupInfo
     {
-        public IReadOnlyList<string> AlbumArtists { get; set; }
-
-        public string Album { get; set; }
-
-        public IReadOnlyList<string> Artists { get; set; }
-
         public SongInfo()
         {
             Artists = Array.Empty<string>();
             AlbumArtists = Array.Empty<string>();
         }
+
+        public IReadOnlyList<string> AlbumArtists { get; set; }
+
+        public string Album { get; set; }
+
+        public IReadOnlyList<string> Artists { get; set; }
     }
 }

+ 0 - 2
MediaBrowser.Controller/Security/IAuthenticationRepository.cs

@@ -13,14 +13,12 @@ namespace MediaBrowser.Controller.Security
         /// Creates the specified information.
         /// </summary>
         /// <param name="info">The information.</param>
-        /// <returns>Task.</returns>
         void Create(AuthenticationInfo info);
 
         /// <summary>
         /// Updates the specified information.
         /// </summary>
         /// <param name="info">The information.</param>
-        /// <returns>Task.</returns>
         void Update(AuthenticationInfo info);
 
         /// <summary>

+ 1 - 1
MediaBrowser.Model/Entities/MediaStream.cs

@@ -469,7 +469,7 @@ namespace MediaBrowser.Model.Entities
         /// <value><c>true</c> if this instance is anamorphic; otherwise, <c>false</c>.</value>
         public bool? IsAnamorphic { get; set; }
 
-        private string GetResolutionText()
+        internal string GetResolutionText()
         {
             if (!Width.HasValue || !Height.HasValue)
             {

+ 2 - 0
MediaBrowser.Model/Properties/AssemblyInfo.cs

@@ -1,5 +1,6 @@
 using System.Reflection;
 using System.Resources;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
 // General Information about an assembly is controlled through the following
@@ -14,6 +15,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 [assembly: NeutralResourcesLanguage("en")]
+[assembly: InternalsVisibleTo("Jellyfin.Model.Tests")]
 
 // Setting ComVisible to false makes the types in this assembly not visible
 // to COM components.  If you need to access a type in this assembly from

+ 1 - 1
tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj

@@ -23,7 +23,7 @@
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
     <PackageReference Include="Moq" Version="4.16.1" />
   </ItemGroup>
 

+ 1 - 1
tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj

@@ -18,7 +18,7 @@
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
     <PackageReference Include="FsCheck.Xunit" Version="2.15.3" />
   </ItemGroup>
 

+ 1 - 1
tests/Jellyfin.Controller.Tests/Jellyfin.Controller.Tests.csproj

@@ -19,7 +19,7 @@
     <PackageReference Include="Moq" Version="4.16.1" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
   </ItemGroup>
 
   <!-- Code Analyzers -->

+ 1 - 1
tests/Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj

@@ -14,7 +14,7 @@
     <PackageReference Include="Moq" Version="4.16.1" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
   </ItemGroup>
 
   <!-- Code Analyzers -->

+ 1 - 1
tests/Jellyfin.Extensions.Tests/Jellyfin.Extensions.Tests.csproj

@@ -16,7 +16,7 @@
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <PrivateAssets>all</PrivateAssets>
     </PackageReference>
-    <PackageReference Include="coverlet.collector" Version="1.3.0">
+    <PackageReference Include="coverlet.collector" Version="3.1.0">
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <PrivateAssets>all</PrivateAssets>
     </PackageReference>

+ 1 - 1
tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj

@@ -24,7 +24,7 @@
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
   </ItemGroup>
 
   <!-- Code Analyzers -->

+ 76 - 0
tests/Jellyfin.Model.Tests/Entities/MediaStreamTests.cs

@@ -0,0 +1,76 @@
+using MediaBrowser.Model.Entities;
+using Xunit;
+
+namespace Jellyfin.Model.Tests.Entities
+{
+    public class MediaStreamTests
+    {
+        [Theory]
+        [InlineData(null, null, false, null)]
+        [InlineData(null, 0, false, null)]
+        [InlineData(0, null, false, null)]
+        [InlineData(640, 480, false, "480p")]
+        [InlineData(640, 480, true, "480i")]
+        [InlineData(720, 576, false, "576p")]
+        [InlineData(720, 576, true, "576i")]
+        [InlineData(960, 540, false, "540p")]
+        [InlineData(960, 540, true, "540i")]
+        [InlineData(1280, 720, false, "720p")]
+        [InlineData(1280, 720, true, "720i")]
+        [InlineData(1920, 1080, false, "1080p")]
+        [InlineData(1920, 1080, true, "1080i")]
+        [InlineData(4096, 3072, false, "4K")]
+        [InlineData(8192, 6144, false, "8K")]
+        [InlineData(512, 384, false, "480p")]
+        [InlineData(576, 336, false, "480p")]
+        [InlineData(624, 352, false, "480p")]
+        [InlineData(640, 352, false, "480p")]
+        [InlineData(704, 396, false, "480p")]
+        [InlineData(720, 404, false, "480p")]
+        [InlineData(720, 480, false, "480p")]
+        [InlineData(768, 576, false, "576p")]
+        [InlineData(960, 720, false, "720p")]
+        [InlineData(1280, 528, false, "720p")]
+        [InlineData(1280, 532, false, "720p")]
+        [InlineData(1280, 534, false, "720p")]
+        [InlineData(1280, 536, false, "720p")]
+        [InlineData(1280, 544, false, "720p")]
+        [InlineData(1280, 690, false, "720p")]
+        [InlineData(1280, 694, false, "720p")]
+        [InlineData(1280, 696, false, "720p")]
+        [InlineData(1280, 716, false, "720p")]
+        [InlineData(1280, 718, false, "720p")]
+        [InlineData(1912, 792, false, "1080p")]
+        [InlineData(1916, 1076, false, "1080p")]
+        [InlineData(1918, 1080, false, "1080p")]
+        [InlineData(1920, 796, false, "1080p")]
+        [InlineData(1920, 800, false, "1080p")]
+        [InlineData(1920, 802, false, "1080p")]
+        [InlineData(1920, 804, false, "1080p")]
+        [InlineData(1920, 808, false, "1080p")]
+        [InlineData(1920, 816, false, "1080p")]
+        [InlineData(1920, 856, false, "1080p")]
+        [InlineData(1920, 960, false, "1080p")]
+        [InlineData(1920, 1024, false, "1080p")]
+        [InlineData(1920, 1040, false, "1080p")]
+        [InlineData(1920, 1072, false, "1080p")]
+        [InlineData(1440, 1072, false, "1080p")]
+        [InlineData(1440, 1080, false, "1080p")]
+        [InlineData(3840, 1600, false, "4K")]
+        [InlineData(3840, 1606, false, "4K")]
+        [InlineData(3840, 1608, false, "4K")]
+        [InlineData(3840, 2160, false, "4K")]
+        [InlineData(7680, 4320, false, "8K")]
+        public void GetResolutionText_Valid(int? width, int? height, bool interlaced, string expected)
+        {
+            var mediaStream = new MediaStream()
+            {
+                Width = width,
+                Height = height,
+                IsInterlaced = interlaced
+            };
+
+            Assert.Equal(expected, mediaStream.GetResolutionText());
+        }
+    }
+}

+ 1 - 1
tests/Jellyfin.Model.Tests/Jellyfin.Model.Tests.csproj

@@ -13,7 +13,7 @@
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
     <PackageReference Include="FsCheck.Xunit" Version="2.15.3" />
   </ItemGroup>
 

+ 1 - 1
tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj

@@ -18,7 +18,7 @@
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
   </ItemGroup>
 
   <ItemGroup>

+ 1 - 1
tests/Jellyfin.Networking.Tests/Jellyfin.Networking.Tests.csproj

@@ -18,7 +18,7 @@
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
     <PackageReference Include="FsCheck.Xunit" Version="2.15.3" />
     <PackageReference Include="Moq" Version="4.16.1" />
   </ItemGroup>

+ 1 - 1
tests/Jellyfin.Providers.Tests/Jellyfin.Providers.Tests.csproj

@@ -17,7 +17,7 @@
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <PrivateAssets>all</PrivateAssets>
     </PackageReference>
-    <PackageReference Include="coverlet.collector" Version="3.0.3">
+    <PackageReference Include="coverlet.collector" Version="3.1.0">
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <PrivateAssets>all</PrivateAssets>
     </PackageReference>

+ 3 - 3
tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs

@@ -1,10 +1,10 @@
+using System;
 using System.Diagnostics.CodeAnalysis;
 using System.IO;
 using System.Runtime.InteropServices;
 using AutoFixture;
 using AutoFixture.AutoMoq;
 using Emby.Server.Implementations.IO;
-using MediaBrowser.Model.System;
 using Xunit;
 
 namespace Jellyfin.Server.Implementations.Tests.IO
@@ -31,7 +31,7 @@ namespace Jellyfin.Server.Implementations.Tests.IO
         {
             var generatedPath = _sut.MakeAbsolutePath(folderPath, filePath);
 
-            if (MediaBrowser.Common.System.OperatingSystem.Id == OperatingSystemId.Windows)
+            if (OperatingSystem.IsWindows())
             {
                 var expectedWindowsPath = expectedAbsolutePath.Replace('/', '\\');
                 Assert.Equal(expectedWindowsPath, generatedPath.Split(':')[1]);
@@ -55,7 +55,7 @@ namespace Jellyfin.Server.Implementations.Tests.IO
         [SkippableFact]
         public void GetFileInfo_DanglingSymlink_ExistsFalse()
         {
-            Skip.If(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
+            Skip.If(OperatingSystem.IsWindows());
 
             string testFileDir = Path.Combine(Path.GetTempPath(), "jellyfin-test-data");
             string testFileName = Path.Combine(testFileDir, Path.GetRandomFileName() + "-danglingsym.link");

+ 1 - 1
tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj

@@ -29,7 +29,7 @@
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
     <PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
   </ItemGroup>
 
   <!-- Code Analyzers -->

+ 1 - 1
tests/Jellyfin.Server.Integration.Tests/Jellyfin.Server.Integration.Tests.csproj

@@ -18,7 +18,7 @@
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
     <PackageReference Include="Xunit.Priority" Version="1.1.6" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
     <PackageReference Include="Moq" Version="4.16.0" />
   </ItemGroup>
 

+ 1 - 1
tests/Jellyfin.Server.Tests/Jellyfin.Server.Tests.csproj

@@ -18,7 +18,7 @@
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
     <PackageReference Include="Moq" Version="4.16.0" />
   </ItemGroup>
 

+ 1 - 1
tests/Jellyfin.XbmcMetadata.Tests/Jellyfin.XbmcMetadata.Tests.csproj

@@ -20,7 +20,7 @@
     <PackageReference Include="Moq" Version="4.16.1" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
-    <PackageReference Include="coverlet.collector" Version="3.0.3" />
+    <PackageReference Include="coverlet.collector" Version="3.1.0" />
   </ItemGroup>
 
   <!-- Code Analyzers -->

+ 4 - 4
tests/Jellyfin.XbmcMetadata.Tests/Location/MovieNfoLocationTests.cs

@@ -1,8 +1,8 @@
-using System.Linq;
+using System;
+using System.Linq;
 using MediaBrowser.Controller.Entities.Movies;
 using MediaBrowser.Controller.Providers;
 using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.System;
 using MediaBrowser.XbmcMetadata.Savers;
 using Xunit;
 
@@ -28,7 +28,7 @@ namespace Jellyfin.XbmcMetadata.Tests.Location
             var path2 = "/media/movies/Avengers Endgame/movie.nfo";
 
             // uses ContainingFolderPath which uses Operating system specific paths
-            if (MediaBrowser.Common.System.OperatingSystem.Id == OperatingSystemId.Windows)
+            if (OperatingSystem.IsWindows())
             {
                 movie.Path = movie.Path.Replace('/', '\\');
                 path1 = path1.Replace('/', '\\');
@@ -49,7 +49,7 @@ namespace Jellyfin.XbmcMetadata.Tests.Location
             var path2 = "/media/movies/Avengers Endgame/VIDEO_TS/VIDEO_TS.nfo";
 
             // uses ContainingFolderPath which uses Operating system specific paths
-            if (MediaBrowser.Common.System.OperatingSystem.Id == OperatingSystemId.Windows)
+            if (OperatingSystem.IsWindows())
             {
                 movie.Path = movie.Path.Replace('/', '\\');
                 path1 = path1.Replace('/', '\\');

+ 1 - 1
tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs

@@ -59,7 +59,7 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
             _localImageFileMetadata = new FileSystemMetadata()
             {
                 Exists = true,
-                FullName = MediaBrowser.Common.System.OperatingSystem.Id == OperatingSystemId.Windows ?
+                FullName = OperatingSystem.IsWindows() ?
                     "C:\\media\\movies\\Justice League (2017).jpg"
                     : "/media/movies/Justice League (2017).jpg"
             };