1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 01:27:00 +00:00

Changed: Modify Artist Update Intervals (#360)

This commit is contained in:
Qstick 2018-05-20 00:51:21 -04:00 committed by GitHub
parent 7bc2d62ba6
commit f7076c6c5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View file

@ -64,7 +64,7 @@ public void Handle(ApplicationStartedEvent message)
new ScheduledTask{ Interval = 5, TypeName = typeof(MessagingCleanupCommand).FullName},
new ScheduledTask{ Interval = 6*60, TypeName = typeof(ApplicationUpdateCommand).FullName},
new ScheduledTask{ Interval = 6*60, TypeName = typeof(CheckHealthCommand).FullName},
new ScheduledTask{ Interval = 12*60, TypeName = typeof(RefreshArtistCommand).FullName},
new ScheduledTask{ Interval = 24*60, TypeName = typeof(RefreshArtistCommand).FullName},
new ScheduledTask{ Interval = 24*60, TypeName = typeof(HousekeepingCommand).FullName},
new ScheduledTask

View file

@ -19,15 +19,15 @@ public ShouldRefreshAlbum(Logger logger)
public bool ShouldRefresh(Album album)
{
if (album.LastInfoSync < DateTime.UtcNow.AddDays(-30))
if (album.LastInfoSync < DateTime.UtcNow.AddDays(-60))
{
_logger.Trace("Album {0} last updated more than 30 days ago, should refresh.", album.Title);
_logger.Trace("Album {0} last updated more than 60 days ago, should refresh.", album.Title);
return true;
}
if (album.LastInfoSync >= DateTime.UtcNow.AddHours(-6))
if (album.LastInfoSync >= DateTime.UtcNow.AddHours(-12))
{
_logger.Trace("Album {0} last updated less than 6 hours ago, should not be refreshed.", album.Title);
_logger.Trace("Album {0} last updated less than 12 hours ago, should not be refreshed.", album.Title);
return false;
}

View file

@ -30,15 +30,15 @@ public bool ShouldRefresh(Artist artist)
return true;
}
if (artist.LastInfoSync >= DateTime.UtcNow.AddHours(-6))
if (artist.LastInfoSync >= DateTime.UtcNow.AddHours(-12))
{
_logger.Trace("Artist {0} last updated less than 6 hours ago, should not be refreshed.", artist.Name);
_logger.Trace("Artist {0} last updated less than 12 hours ago, should not be refreshed.", artist.Name);
return false;
}
if (artist.Status == ArtistStatusType.Continuing)
if (artist.Status == ArtistStatusType.Continuing && artist.LastInfoSync < DateTime.UtcNow.AddDays(-2))
{
_logger.Trace("Artist {0} is continuing, should refresh.", artist.Name);
_logger.Trace("Artist {0} is continuing and has not been refreshed in 2 days, should refresh.", artist.Name);
return true;
}