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

Fixed: Adjust how often info is refreshed for old movies

This commit is contained in:
Qstick 2019-06-29 21:44:43 -04:00
parent 4ddadd9a0d
commit 7760248e6b

View File

@ -21,21 +21,21 @@ public ShouldRefreshMovie(Logger logger)
public bool ShouldRefresh(Movie movie)
{
//return false;
if (movie.LastInfoSync < DateTime.UtcNow.AddDays(-30))
if (movie.LastInfoSync < DateTime.UtcNow.AddDays(-180))
{
_logger.Trace("Movie {0} last updated more than 30 days ago, should refresh.", movie.Title);
_logger.Trace("Movie {0} last updated more than 180 days ago, should refresh.", movie.Title);
return true;
}
if (movie.LastInfoSync >= DateTime.UtcNow.AddHours(-6))
if (movie.LastInfoSync >= DateTime.UtcNow.AddHours(-12))
{
_logger.Trace("Movie {0} last updated less than 6 hours ago, should not be refreshed.", movie.Title);
_logger.Trace("Movie {0} last updated less than 12 hours ago, should not be refreshed.", movie.Title);
return false;
}
if (movie.Status == MovieStatusType.Announced || movie.Status == MovieStatusType.InCinemas)
{
_logger.Trace("Movie {0} is announced or in cinemas, should refresh.", movie.Title); //We probably have to change this.
_logger.Trace("Movie {0} is announced or in cinemas, should refresh.", movie.Title);
return true;
}