Fixed: Include Digital Only Releases for Recent Movie determination

Use most recent of physical or digital release date
This commit is contained in:
Bakerboy448 2023-04-11 16:48:43 -05:00 committed by Qstick
parent ec7f7b085a
commit 669d87b7ef
1 changed files with 5 additions and 8 deletions

View File

@ -61,17 +61,14 @@ namespace NzbDrone.Core.Movies
{
get
{
if (PhysicalRelease.HasValue)
if ((PhysicalRelease.HasValue && PhysicalRelease.Value >= DateTime.UtcNow.AddDays(-21)) ||
(DigitalRelease.HasValue && DigitalRelease.Value >= DateTime.UtcNow.AddDays(-21)) ||
(InCinemas.HasValue && InCinemas.Value >= DateTime.UtcNow.AddDays(-120)))
{
return PhysicalRelease.Value >= DateTime.UtcNow.AddDays(-21);
return true;
}
if (InCinemas.HasValue)
{
return InCinemas.Value >= DateTime.UtcNow.AddDays(-120);
}
return true;
return false;
}
}