|
|
@ -1,4 +1,5 @@
|
|
|
|
using System.Linq;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
using System.Linq;
|
|
|
|
using NzbDrone.Api.Episodes;
|
|
|
|
using NzbDrone.Api.Episodes;
|
|
|
|
using NzbDrone.Api.Extensions;
|
|
|
|
using NzbDrone.Api.Extensions;
|
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
@ -30,6 +31,12 @@ namespace NzbDrone.Api.Wanted
|
|
|
|
SortDirection = pagingResource.SortDirection
|
|
|
|
SortDirection = pagingResource.SortDirection
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//This is a hack to deal with backgrid setting the sortKey to the column name instead of sortValue
|
|
|
|
|
|
|
|
if (pagingSpec.SortKey.Equals("series", StringComparison.InvariantCultureIgnoreCase))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
pagingSpec.SortKey = "series.sortTitle";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (pagingResource.FilterKey == "monitored" && pagingResource.FilterValue == "false")
|
|
|
|
if (pagingResource.FilterKey == "monitored" && pagingResource.FilterValue == "false")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
pagingSpec.FilterExpression = v => v.Monitored == false || v.Series.Monitored == false;
|
|
|
|
pagingSpec.FilterExpression = v => v.Monitored == false || v.Series.Monitored == false;
|
|
|
|