From d4422e8901f1721caeabcc54c28568fd9b139c79 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 15 Dec 2019 00:35:42 -0500 Subject: [PATCH] Fixed: Change Refresh to Use StartTime --- src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs | 3 +++ src/NzbDrone.Core/Movies/RefreshMovieService.cs | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs index b44d674fc..661671f76 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs @@ -52,10 +52,13 @@ public SkyHookProxy(IHttpClient httpClient, IRadarrCloudRequestBuilder requestBu public HashSet 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; diff --git a/src/NzbDrone.Core/Movies/RefreshMovieService.cs b/src/NzbDrone.Core/Movies/RefreshMovieService.cs index 36050024b..fb7b106e7 100644 --- a/src/NzbDrone.Core/Movies/RefreshMovieService.cs +++ b/src/NzbDrone.Core/Movies/RefreshMovieService.cs @@ -220,10 +220,9 @@ public void Execute(RefreshMovieCommand message) var updatedTMDBMovies = new HashSet(); - 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)