mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
empty string case should not be only for the contains case
This commit is contained in:
parent
ff11388009
commit
7d394dcff2
1 changed files with 11 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue