aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Sorting/RuntimeComparer.cs
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 23:28:05 +0100
committerErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 23:28:05 +0100
commitae0732136fe72e5e3c26517e9e350178bf2e9b59 (patch)
treecdfc9cd6ce97ceca0b2d8d3023d9815f80357dd5 /Emby.Server.Implementations/Sorting/RuntimeComparer.cs
parentd7b7be395b76c7fcc49d3baffeb59d51a9b36378 (diff)
parentf8dd182e422db49d98cc090f4e205cc46517f610 (diff)
Merge remote-tracking branch 'upstream/dev' into build-system-consolidation
Diffstat (limited to 'Emby.Server.Implementations/Sorting/RuntimeComparer.cs')
-rw-r--r--Emby.Server.Implementations/Sorting/RuntimeComparer.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Sorting/RuntimeComparer.cs b/Emby.Server.Implementations/Sorting/RuntimeComparer.cs
index 63c4758cb..77851d702 100644
--- a/Emby.Server.Implementations/Sorting/RuntimeComparer.cs
+++ b/Emby.Server.Implementations/Sorting/RuntimeComparer.cs
@@ -1,6 +1,7 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Sorting;
using MediaBrowser.Model.Querying;
+using System;
namespace Emby.Server.Implementations.Sorting
{
@@ -17,6 +18,12 @@ namespace Emby.Server.Implementations.Sorting
/// <returns>System.Int32.</returns>
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.RunTimeTicks ?? 0).CompareTo(y.RunTimeTicks ?? 0);
}
@@ -24,9 +31,6 @@ namespace Emby.Server.Implementations.Sorting
/// Gets the name.
/// </summary>
/// <value>The name.</value>
- public string Name
- {
- get { return ItemSortBy.Runtime; }
- }
+ public string Name => ItemSortBy.Runtime;
}
}