Fixed unit tests

This commit is contained in:
tidusjar 2021-03-25 09:04:48 +00:00
parent 5678f43f41
commit b9f5c06b7c
4 changed files with 18 additions and 6 deletions

View file

@ -17,7 +17,7 @@ namespace Ombi.Core.Rule.Rules.Search
{
// If we have all the episodes for this season, then this season is available
if (season.Episodes.All(x => x.Available))
{
{
season.SeasonAvailable = true;
}
}
@ -28,8 +28,9 @@ namespace Ombi.Core.Rule.Rules.Search
else if (search.SeasonRequests.Any(x => x.Episodes.Any(e => e.Available)))
{
search.PartlyAvailable = true;
}
else
}
if (!search.FullyAvailable)
{
var airedButNotAvailable = search.SeasonRequests.Any(x =>
x.Episodes.Any(c => !c.Available && c.AirDate <= DateTime.Now.Date && c.AirDate != DateTime.MinValue));