1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

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

View File

@ -98,7 +98,13 @@ public bool IsAvailable(int delay = 0)
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()