mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 10:32:35 +01:00
empty string case should not be only for the contains case
This commit is contained in:
parent
ff11388009
commit
7d394dcff2
@ -140,21 +140,22 @@ private PagingResource<MovieResource> GetMoviePaged(PagingResource<MovieResource
|
||||
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
Block a user