mirror of
https://github.com/Radarr/Radarr
synced 2025-01-04 06:23:32 +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)
|
public HashSet<int> GetChangedMovies (DateTime startTime)
|
||||||
{
|
{
|
||||||
|
var startDate = startTime.ToString("o");
|
||||||
|
|
||||||
var request = _movieBuilder.Create()
|
var request = _movieBuilder.Create()
|
||||||
.SetSegment("route", "movie")
|
.SetSegment("route", "movie")
|
||||||
.SetSegment("id", "")
|
.SetSegment("id", "")
|
||||||
.SetSegment("secondaryRoute", "changes")
|
.SetSegment("secondaryRoute", "changes")
|
||||||
|
.AddQueryParam("start_date", startDate)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
request.AllowAutoRedirect = true;
|
request.AllowAutoRedirect = true;
|
||||||
|
|
|
@ -220,10 +220,9 @@ public void Execute(RefreshMovieCommand message)
|
||||||
|
|
||||||
var updatedTMDBMovies = new HashSet<int>();
|
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.LastStartTime.Value);
|
||||||
updatedTMDBMovies = _movieInfo.GetChangedMovies(message.LastExecutionTime.Value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var movie in allMovie)
|
foreach (var movie in allMovie)
|
||||||
|
|
Loading…
Reference in a new issue