Fix error when MinimumAvailability was Announced and Delay was negative.

This commit is contained in:
Leonardo Galli 2017-04-17 12:08:03 +02:00
parent fbf790e9fd
commit 23754c49dc
1 changed files with 7 additions and 1 deletions

View File

@ -98,7 +98,13 @@ namespace NzbDrone.Core.Tv
return true;
}
return DateTime.Now >= MinimumAvailabilityDate.AddDays((double)delay);
if (MinimumAvailabilityDate == DateTime.MinValue || MinimumAvailabilityDate == DateTime.MaxValue)
{
return DateTime.Now >= MinimumAvailabilityDate;
}
return DateTime.Now >= MinimumAvailabilityDate.AddDays((double)delay);
}
public override string ToString()