diff options
Diffstat (limited to 'Emby.Server.Implementations/Sorting')
5 files changed, 7 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs b/Emby.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs index 2d21bd9c2..964004ecc 100644 --- a/Emby.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs +++ b/Emby.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs @@ -31,9 +31,9 @@ namespace Emby.Server.Implementations.Sorting var episode1 = x as Episode; var episode2 = y as Episode; - if (episode1 == null) + if (episode1 is null) { - if (episode2 == null) + if (episode2 is null) { return 0; } @@ -41,7 +41,7 @@ namespace Emby.Server.Implementations.Sorting return 1; } - if (episode2 == null) + if (episode2 is null) { return -1; } diff --git a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs index ec818253b..453d817c7 100644 --- a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs @@ -58,7 +58,7 @@ namespace Emby.Server.Implementations.Sorting { var userdata = UserDataRepository.GetUserData(User, x); - if (userdata != null && userdata.LastPlayedDate.HasValue) + if (userdata is not null && userdata.LastPlayedDate.HasValue) { return userdata.LastPlayedDate.Value; } diff --git a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs index 45c9044c5..16f1b79b3 100644 --- a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs +++ b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs @@ -57,7 +57,7 @@ namespace Emby.Server.Implementations.Sorting { var userdata = UserDataRepository.GetUserData(User, x); - return userdata == null ? 0 : userdata.PlayCount; + return userdata is null ? 0 : userdata.PlayCount; } } } diff --git a/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs b/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs index b217556ef..db86b8002 100644 --- a/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs +++ b/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs @@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.Sorting /// <returns>DateTime.</returns> private static DateTime GetDate(BaseItem? x) { - if (x == null) + if (x is null) { return DateTime.MinValue; } diff --git a/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs b/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs index d2022df7a..7fd1e024d 100644 --- a/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs +++ b/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs @@ -33,7 +33,7 @@ namespace Emby.Server.Implementations.Sorting /// <returns>DateTime.</returns> private static int GetValue(BaseItem? x) { - if (x == null) + if (x is null) { return 0; } |
