mirror of
https://github.com/Radarr/Radarr
synced 2025-01-01 12:54:21 +00:00
Fixed: Change Refresh to Use StartTime
This commit is contained in:
parent
da50b49e01
commit
d4422e8901
2 changed files with 5 additions and 3 deletions
|
@ -52,10 +52,13 @@ public SkyHookProxy(IHttpClient httpClient, IRadarrCloudRequestBuilder requestBu
|
|||
|
||||
public HashSet<int> GetChangedMovies (DateTime startTime)
|
||||
{
|
||||
var startDate = startTime.ToString("o");
|
||||
|
||||
var request = _movieBuilder.Create()
|
||||
.SetSegment("route", "movie")
|
||||
.SetSegment("id", "")
|
||||
.SetSegment("secondaryRoute", "changes")
|
||||
.AddQueryParam("start_date", startDate)
|
||||
.Build();
|
||||
|
||||
request.AllowAutoRedirect = true;
|
||||
|
|
|
@ -220,10 +220,9 @@ public void Execute(RefreshMovieCommand message)
|
|||
|
||||
var updatedTMDBMovies = new HashSet<int>();
|
||||
|
||||
if (message.LastExecutionTime.HasValue && message.LastExecutionTime.Value.AddDays(14) > DateTime.UtcNow)
|
||||
if (message.LastStartTime.HasValue && message.LastStartTime.Value.AddDays(14) > DateTime.UtcNow)
|
||||
{
|
||||
// TODO: Should we add some overlap to ensure we get everything?
|
||||
updatedTMDBMovies = _movieInfo.GetChangedMovies(message.LastExecutionTime.Value);
|
||||
updatedTMDBMovies = _movieInfo.GetChangedMovies(message.LastStartTime.Value);
|
||||
}
|
||||
|
||||
foreach (var movie in allMovie)
|
||||
|
|
Loading…
Reference in a new issue