|
|
|
@ -141,21 +141,22 @@ namespace NzbDrone.Api.Movie
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (pagingResource.FilterKey == "title")
|
|
|
|
|
{
|
|
|
|
|
if (pagingResource.FilterType == "contains")
|
|
|
|
|
{
|
|
|
|
|
if (pagingResource.FilterValue == string.Empty || pagingResource.FilterValue == null)
|
|
|
|
|
{
|
|
|
|
|
pagingSpec.FilterExpression = v => true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (pagingResource.FilterType == "contains")
|
|
|
|
|
{
|
|
|
|
|
pagingSpec.FilterExpression = v => v.CleanTitle.Contains(pagingResource.FilterValue);
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pagingSpec.FilterExpression = v => v.CleanTitle == pagingResource.FilterValue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ApplyToPage(_moviesService.Paged, pagingSpec, MovieResourceMapper.ToResource);
|
|
|
|
|