aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Sorting/RevenueComparer.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-03-08 02:24:30 -0500
committerGitHub <noreply@github.com>2017-03-08 02:24:30 -0500
commit23010f2980381a4b56e05620d4604cafc0e00043 (patch)
tree418b4ad6964c84d17ff9c33fa88b0e1a8bcacd34 /Emby.Server.Implementations/Sorting/RevenueComparer.cs
parent0ac0a09c806112ce82dcd23f43c7df9ff8b5531d (diff)
parent314b84ae9ef5a692144b0a3a178ddcbd393c9fb9 (diff)
Merge pull request #2516 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/Sorting/RevenueComparer.cs')
-rw-r--r--Emby.Server.Implementations/Sorting/RevenueComparer.cs39
1 files changed, 0 insertions, 39 deletions
diff --git a/Emby.Server.Implementations/Sorting/RevenueComparer.cs b/Emby.Server.Implementations/Sorting/RevenueComparer.cs
deleted file mode 100644
index 62e43eac1..000000000
--- a/Emby.Server.Implementations/Sorting/RevenueComparer.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using MediaBrowser.Controller.Entities;
-using MediaBrowser.Controller.Sorting;
-using MediaBrowser.Model.Querying;
-
-namespace Emby.Server.Implementations.Sorting
-{
- public class RevenueComparer : IBaseItemComparer
- {
- /// <summary>
- /// Compares the specified x.
- /// </summary>
- /// <param name="x">The x.</param>
- /// <param name="y">The y.</param>
- /// <returns>System.Int32.</returns>
- public int Compare(BaseItem x, BaseItem y)
- {
- return GetValue(x).CompareTo(GetValue(y));
- }
-
- private double GetValue(BaseItem x)
- {
- var hasBudget = x as IHasBudget;
- if (hasBudget != null)
- {
- return hasBudget.Revenue ?? 0;
- }
- return 0;
- }
-
- /// <summary>
- /// Gets the name.
- /// </summary>
- /// <value>The name.</value>
- public string Name
- {
- get { return ItemSortBy.Revenue; }
- }
- }
-}