Added IHasBudget

This commit is contained in:
Luke Pulverenti
2013-12-02 11:16:03 -05:00
parent 44b2ec2093
commit 317f411070
13 changed files with 116 additions and 39 deletions

View File

@@ -19,7 +19,12 @@ namespace MediaBrowser.Server.Implementations.Sorting
private double GetValue(BaseItem x)
{
return x.Budget ?? 0;
var hasBudget = x as IHasBudget;
if (hasBudget != null)
{
return hasBudget.Budget ?? 0;
}
return 0;
}
/// <summary>

View File

@@ -19,7 +19,12 @@ namespace MediaBrowser.Server.Implementations.Sorting
private double GetValue(BaseItem x)
{
return x.Revenue ?? 0;
var hasBudget = x as IHasBudget;
if (hasBudget != null)
{
return hasBudget.Revenue ?? 0;
}
return 0;
}
/// <summary>