mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-17 15:02:34 +02:00
Fixed: Adjust how often info is refreshed for old movies
This commit is contained in:
parent
4ddadd9a0d
commit
7760248e6b
@ -21,21 +21,21 @@ public ShouldRefreshMovie(Logger logger)
|
|||||||
public bool ShouldRefresh(Movie movie)
|
public bool ShouldRefresh(Movie movie)
|
||||||
{
|
{
|
||||||
//return false;
|
//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;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (movie.Status == MovieStatusType.Announced || movie.Status == MovieStatusType.InCinemas)
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user