[FieldDefinition(1, Type = FieldType.Number, Label = "Query Limit", HelpText = "The number of max queries as specified by the respective unit that Prowlarr will allow to the site", Advanced = true)]
[FieldDefinition(1, Type = FieldType.Number, Label = "Query Limit", HelpText = "The number of queries within a rolling 24 hour period Prowlarr will allow to the site", Advanced = true)]
publicint?QueryLimit{get;set;}
publicint?QueryLimit{get;set;}
[FieldDefinition(2, Type = FieldType.Number, Label = "Grab Limit", HelpText = "The number of grabs within a rolling 24 hour period Prowlarr will allow to the site", Advanced = true)]
[FieldDefinition(2, Type = FieldType.Number, Label = "Grab Limit", HelpText = "The number of max grabs as specified by the respective unit that Prowlarr will allow to the site", Advanced = true)]
publicint?GrabLimit{get;set;}
publicint?GrabLimit{get;set;}
[FieldDefinition(3, Type = FieldType.Select, SelectOptions = typeof(IndexerLimitsUnit), Label = "Limits Unit", HelpText = "The unit of time for counting limits per indexer", Advanced = true)]
_logger.Info("Indexer {0} has performed {1} of possible {2} grabs in last 24 hours, exceeding the maximum grab limit",indexer.Name,grabCount,grabLimit);
_logger.Info("Indexer {0} has performed {1} of possible {2} grabs in last {3} hour(s), exceeding the maximum grab limit",indexer.Name,grabCount,grabLimit,intervalLimitHours);
returntrue;
returntrue;
}
}
_logger.Debug("Indexer {0} has performed {1} of possible {2} grabs in last 24 hours, proceeding",indexer.Name,grabCount,grabLimit);
_logger.Debug("Indexer {0} has performed {1} of possible {2} grabs in last {3} hour(s), proceeding",indexer.Name,grabCount,grabLimit,intervalLimitHours);
_logger.Info("Indexer {0} has performed {1} of possible {2} queries in last 24 hours, exceeding the maximum query limit",indexer.Name,queryCount,queryLimit);
_logger.Info("Indexer {0} has performed {1} of possible {2} queries in last {3} hour(s), exceeding the maximum query limit",indexer.Name,queryCount,queryLimit,intervalLimitHours);
returntrue;
returntrue;
}
}
_logger.Debug("Indexer {0} has performed {1} of possible {2} queries in last 24 hours, proceeding",indexer.Name,queryCount,queryLimit);
_logger.Debug("Indexer {0} has performed {1} of possible {2} queries in last {3} hour(s), proceeding",indexer.Name,queryCount,queryLimit,intervalLimitHours);
returnCreateResponse(CreateErrorXML(429,$"User configurable Indexer Query Limit of {queryLimit} in last {intervalLimitHours} hour(s) reached."),statusCode:StatusCodes.Status429TooManyRequests);
returnCreateResponse(CreateErrorXML(429,$"User configurable Indexer Grab Limit of {grabLimit} in last {intervalLimitHours} hour(s) reached."),statusCode:StatusCodes.Status429TooManyRequests);