mirror of https://github.com/Radarr/Radarr
Using a tiered fallback is safer in case there is another data-loss and ids get reset.
This commit is contained in:
parent
e2d6d374ab
commit
c249ad5dbe
|
@ -25,18 +25,18 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
|
||||||
{
|
{
|
||||||
var pageableRequests = new IndexerPageableRequestChain();
|
var pageableRequests = new IndexerPageableRequestChain();
|
||||||
|
|
||||||
var parameters = new BroadcastheNetTorrentQuery();
|
|
||||||
|
|
||||||
if (LastRecentTorrentID.HasValue)
|
if (LastRecentTorrentID.HasValue)
|
||||||
{
|
{
|
||||||
parameters.Id = ">=" + (LastRecentTorrentID.Value - 100);
|
pageableRequests.Add(GetPagedRequests(MaxPages, new BroadcastheNetTorrentQuery()
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
parameters.Age = "<=86400";
|
Id = ">=" + (LastRecentTorrentID.Value - 100)
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
pageableRequests.Add(GetPagedRequests(MaxPages, parameters));
|
pageableRequests.AddTier(GetPagedRequests(MaxPages, new BroadcastheNetTorrentQuery()
|
||||||
|
{
|
||||||
|
Age = "<=86400"
|
||||||
|
}));
|
||||||
|
|
||||||
return pageableRequests;
|
return pageableRequests;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue