Fixed: Wanted Missing showing Unmonitored episodes

Closes #6084
This commit is contained in:
Bogdan 2023-10-10 16:56:35 +03:00 committed by GitHub
parent 5bceacb30e
commit 3ade52fc90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View File

@ -39,7 +39,14 @@ namespace Sonarr.Api.V3.Wanted
SortDirection = pagingResource.SortDirection
};
pagingSpec.FilterExpressions.Add(v => v.Monitored == monitored || v.Series.Monitored == monitored);
if (monitored)
{
pagingSpec.FilterExpressions.Add(v => v.Monitored == true && v.Series.Monitored == true);
}
else
{
pagingSpec.FilterExpressions.Add(v => v.Monitored == false || v.Series.Monitored == false);
}
var resource = pagingSpec.ApplyToPage(_episodeCutoffService.EpisodesWhereCutoffUnmet, v => MapToResource(v, includeSeries, includeEpisodeFile, includeImages));

View File

@ -35,7 +35,14 @@ namespace Sonarr.Api.V3.Wanted
SortDirection = pagingResource.SortDirection
};
pagingSpec.FilterExpressions.Add(v => v.Monitored == monitored || v.Series.Monitored == monitored);
if (monitored)
{
pagingSpec.FilterExpressions.Add(v => v.Monitored == true && v.Series.Monitored == true);
}
else
{
pagingSpec.FilterExpressions.Add(v => v.Monitored == false || v.Series.Monitored == false);
}
var resource = pagingSpec.ApplyToPage(_episodeService.EpisodesWithoutFiles, v => MapToResource(v, includeSeries, false, includeImages));