diff options
| author | crobibero <cody@robibe.ro> | 2020-06-13 13:03:09 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-06-13 13:03:09 -0600 |
| commit | 829eb1a8494b3d0a4a5170f5942f33920f179e73 (patch) | |
| tree | 50acc3d0800da593aac0a252dad6226c73f3c1d5 /Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs | |
| parent | d975ad155e7857bcbfcf55246fd78dd87ed594ca (diff) | |
| parent | 403cd3205ffb970cfda88b6c49dc69127fada798 (diff) | |
merge master into api-migration
Diffstat (limited to 'Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs')
| -rw-r--r-- | Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs | 18 |
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; } } |
