mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: (Indexers) Add SupportsPagination
to prevent fetching the first page multiple times
This commit is contained in:
@@ -33,6 +33,7 @@ namespace NzbDrone.Core.Indexers
|
||||
public override bool SupportsRss => true;
|
||||
public override bool SupportsSearch => true;
|
||||
public override bool SupportsRedirect => false;
|
||||
public override bool SupportsPagination => false;
|
||||
|
||||
public override Encoding Encoding => Encoding.UTF8;
|
||||
public override string Language => "en-US";
|
||||
@@ -60,6 +61,11 @@ namespace NzbDrone.Core.Indexers
|
||||
return Task.FromResult(new IndexerPageableQueryResult());
|
||||
}
|
||||
|
||||
if (!SupportsPagination && searchCriteria.Offset is > 0)
|
||||
{
|
||||
return Task.FromResult(new IndexerPageableQueryResult());
|
||||
}
|
||||
|
||||
return FetchReleases(g => SetCookieFunctions(g).GetSearchRequests(searchCriteria), searchCriteria);
|
||||
}
|
||||
|
||||
@@ -70,6 +76,11 @@ namespace NzbDrone.Core.Indexers
|
||||
return Task.FromResult(new IndexerPageableQueryResult());
|
||||
}
|
||||
|
||||
if (!SupportsPagination && searchCriteria.Offset is > 0)
|
||||
{
|
||||
return Task.FromResult(new IndexerPageableQueryResult());
|
||||
}
|
||||
|
||||
return FetchReleases(g => SetCookieFunctions(g).GetSearchRequests(searchCriteria), searchCriteria);
|
||||
}
|
||||
|
||||
@@ -80,6 +91,11 @@ namespace NzbDrone.Core.Indexers
|
||||
return Task.FromResult(new IndexerPageableQueryResult());
|
||||
}
|
||||
|
||||
if (!SupportsPagination && searchCriteria.Offset is > 0)
|
||||
{
|
||||
return Task.FromResult(new IndexerPageableQueryResult());
|
||||
}
|
||||
|
||||
return FetchReleases(g => SetCookieFunctions(g).GetSearchRequests(searchCriteria), searchCriteria);
|
||||
}
|
||||
|
||||
@@ -90,6 +106,11 @@ namespace NzbDrone.Core.Indexers
|
||||
return Task.FromResult(new IndexerPageableQueryResult());
|
||||
}
|
||||
|
||||
if (!SupportsPagination && searchCriteria.Offset is > 0)
|
||||
{
|
||||
return Task.FromResult(new IndexerPageableQueryResult());
|
||||
}
|
||||
|
||||
return FetchReleases(g => SetCookieFunctions(g).GetSearchRequests(searchCriteria), searchCriteria);
|
||||
}
|
||||
|
||||
@@ -100,6 +121,11 @@ namespace NzbDrone.Core.Indexers
|
||||
return Task.FromResult(new IndexerPageableQueryResult());
|
||||
}
|
||||
|
||||
if (!SupportsPagination && searchCriteria.Offset is > 0)
|
||||
{
|
||||
return Task.FromResult(new IndexerPageableQueryResult());
|
||||
}
|
||||
|
||||
return FetchReleases(g => SetCookieFunctions(g).GetSearchRequests(searchCriteria), searchCriteria);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user