mirror of https://github.com/Radarr/Radarr
empty string case should not be only for the contains case
This commit is contained in:
parent
ff11388009
commit
7d394dcff2
|
@ -140,21 +140,22 @@ namespace NzbDrone.Api.Movie
|
|||
pagingSpec.FilterExpression = v => v.MovieFileId == 0;
|
||||
}
|
||||
|
||||
if (pagingResource.FilterKey == "title")
|
||||
if (pagingResource.FilterKey == "title")
|
||||
{
|
||||
if (pagingResource.FilterType == "contains")
|
||||
if (pagingResource.FilterValue == string.Empty || pagingResource.FilterValue == null)
|
||||
{
|
||||
if (pagingResource.FilterValue == string.Empty || pagingResource.FilterValue == null)
|
||||
{
|
||||
pagingSpec.FilterExpression = v => true;
|
||||
}
|
||||
else
|
||||
pagingSpec.FilterExpression = v => true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pagingResource.FilterType == "contains")
|
||||
{
|
||||
pagingSpec.FilterExpression = v => v.CleanTitle.Contains(pagingResource.FilterValue);
|
||||
}
|
||||
} else
|
||||
{
|
||||
pagingSpec.FilterExpression = v => v.CleanTitle == pagingResource.FilterValue;
|
||||
else
|
||||
{
|
||||
pagingSpec.FilterExpression = v => v.CleanTitle == pagingResource.FilterValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue