mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-26 17:47:08 +00:00
Changed: Modify Artist Update Intervals (#360)
This commit is contained in:
parent
7bc2d62ba6
commit
f7076c6c5b
3 changed files with 9 additions and 9 deletions
|
@ -64,7 +64,7 @@ public void Handle(ApplicationStartedEvent message)
|
||||||
new ScheduledTask{ Interval = 5, TypeName = typeof(MessagingCleanupCommand).FullName},
|
new ScheduledTask{ Interval = 5, TypeName = typeof(MessagingCleanupCommand).FullName},
|
||||||
new ScheduledTask{ Interval = 6*60, TypeName = typeof(ApplicationUpdateCommand).FullName},
|
new ScheduledTask{ Interval = 6*60, TypeName = typeof(ApplicationUpdateCommand).FullName},
|
||||||
new ScheduledTask{ Interval = 6*60, TypeName = typeof(CheckHealthCommand).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{ Interval = 24*60, TypeName = typeof(HousekeepingCommand).FullName},
|
||||||
|
|
||||||
new ScheduledTask
|
new ScheduledTask
|
||||||
|
|
|
@ -19,15 +19,15 @@ public ShouldRefreshAlbum(Logger logger)
|
||||||
|
|
||||||
public bool ShouldRefresh(Album album)
|
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;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,15 +30,15 @@ public bool ShouldRefresh(Artist artist)
|
||||||
return true;
|
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;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue