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:
@@ -25,6 +25,7 @@ namespace Prowlarr.Api.V1.Indexers
|
||||
public bool SupportsRss { get; set; }
|
||||
public bool SupportsSearch { get; set; }
|
||||
public bool SupportsRedirect { get; set; }
|
||||
public bool SupportsPagination { get; set; }
|
||||
public int AppProfileId { get; set; }
|
||||
public DownloadProtocol Protocol { get; set; }
|
||||
public IndexerPrivacy Privacy { get; set; }
|
||||
@@ -57,9 +58,9 @@ namespace Prowlarr.Api.V1.Indexers
|
||||
|
||||
var infoLinkName = definition.ImplementationName;
|
||||
|
||||
if (definition.Implementation == typeof(Cardigann).Name)
|
||||
if (definition.Implementation == nameof(Cardigann))
|
||||
{
|
||||
var extraFields = definition.ExtraFields?.Select((x, i) => MapField(x, i)).ToList() ?? new List<Field>();
|
||||
var extraFields = definition.ExtraFields?.Select(MapField).ToList() ?? new List<Field>();
|
||||
|
||||
resource.Fields.AddRange(extraFields);
|
||||
|
||||
@@ -79,7 +80,7 @@ namespace Prowlarr.Api.V1.Indexers
|
||||
infoLinkName = settings.DefinitionFile;
|
||||
}
|
||||
|
||||
resource.InfoLink = string.Format("https://wiki.servarr.com/prowlarr/supported-indexers#{0}", infoLinkName.ToLower().Replace(' ', '-'));
|
||||
resource.InfoLink = $"https://wiki.servarr.com/prowlarr/supported-indexers#{infoLinkName.ToLower().Replace(' ', '-')}";
|
||||
resource.AppProfileId = definition.AppProfileId;
|
||||
resource.IndexerUrls = definition.IndexerUrls;
|
||||
resource.LegacyUrls = definition.LegacyUrls;
|
||||
@@ -91,6 +92,7 @@ namespace Prowlarr.Api.V1.Indexers
|
||||
resource.SupportsRss = definition.SupportsRss;
|
||||
resource.SupportsSearch = definition.SupportsSearch;
|
||||
resource.SupportsRedirect = definition.SupportsRedirect;
|
||||
resource.SupportsPagination = definition.SupportsPagination;
|
||||
resource.Capabilities = definition.Capabilities.ToResource();
|
||||
resource.Protocol = definition.Protocol;
|
||||
resource.Privacy = definition.Privacy;
|
||||
|
Reference in New Issue
Block a user