fixed preview funnel counting the previous cycle

This commit is contained in:
Flaminel committed 2026-10-21 21:28:11 +03:00
1 parent 2cab56a5e5
commit 63b606086f
2 files changed
+4 -1

No files matched your search

@@ -247,6 +247,8 @@ public class SeekerPreviewControllerTests : IDisposable
response.CycleWaitingUntil.ShouldBeNull();
response.NextUp.Count.ShouldBe(2);
response.Excluded.ShouldBeEmpty();
response.Funnel.RemainingUnits.ShouldBe(2);
response.Funnel.SearchedUnits.ShouldBe(0);
}
[Fact]
@@ -114,7 +114,6 @@ public sealed class SeekerPreviewController : ControllerBase
return this.ProblemResult(StatusCodes.Status502BadGateway, "Seeker needs Radarr v5.6 or newer");
}
InstanceFunnelStat funnel = ToFunnel(evaluation);
DateTimeOffset? waitingUntil = null;
// Same rollover as the Seeker job: a cycle with nothing left waits out the minimum cycle time, then starts over.
@@ -131,6 +130,8 @@ public sealed class SeekerPreviewController : ControllerBase
}
}
InstanceFunnelStat funnel = ToFunnel(evaluation);
List<SeekerSearchCandidate> nextUp = waitingUntil is null
? SeekerUnitEvaluator.SelectNext(evaluation, config.SelectionStrategy, NextUpCount)
: [];