aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs
diff options
context:
space:
mode:
authorBond_009 <Bond.009@outlook.com>2020-05-29 11:28:19 +0200
committerBond_009 <Bond.009@outlook.com>2020-05-29 11:28:19 +0200
commit4748105dce13c0fe0b4d8fcbf44f26033d314b26 (patch)
treef679568b9cd24779a534d328377f24f8237d6e46 /Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs
parent02624c9df8492b019539f235307108d49774434c (diff)
Enable TreatWarningsAsErrors for Jellyfin.Server.Implementations in Release mode
Diffstat (limited to 'Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs')
-rw-r--r--Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs18
1 files changed, 12 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs b/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs
index 87d3ae2d6..980954ba0 100644
--- a/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs
+++ b/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Sorting;
@@ -8,6 +10,12 @@ namespace Emby.Server.Implementations.Sorting
public class CommunityRatingComparer : IBaseItemComparer
{
/// <summary>
+ /// Gets the name.
+ /// </summary>
+ /// <value>The name.</value>
+ public string Name => ItemSortBy.CommunityRating;
+
+ /// <summary>
/// Compares the specified x.
/// </summary>
/// <param name="x">The x.</param>
@@ -16,18 +24,16 @@ namespace Emby.Server.Implementations.Sorting
public int Compare(BaseItem x, BaseItem y)
{
if (x == null)
+ {
throw new ArgumentNullException(nameof(x));
+ }
if (y == null)
+ {
throw new ArgumentNullException(nameof(y));
+ }
return (x.CommunityRating ?? 0).CompareTo(y.CommunityRating ?? 0);
}
-
- /// <summary>
- /// Gets the name.
- /// </summary>
- /// <value>The name.</value>
- public string Name => ItemSortBy.CommunityRating;
}
}