This commit is contained in:
simonefil 2026-05-02 20:00:34 +01:00 committed by GitHub
commit dad5037eb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 881 additions and 858 deletions

File diff suppressed because it is too large Load diff

View file

@ -16,6 +16,11 @@ public IndexerCommonSettingsValidator()
.GreaterThan(0)
.When(c => c.GrabLimit.HasValue)
.WithMessage("Should be greater than zero");
RuleFor(c => c.QueryTimeout)
.InclusiveBetween(1, 300)
.When(c => c.QueryLimit.HasValue)
.WithMessage("Must be between 1 and 300 seconds (5 minutes)");
}
}
@ -29,6 +34,9 @@ public class IndexerBaseSettings
[FieldDefinition(3, Type = FieldType.Select, Label = "IndexerSettingsLimitsUnit", SelectOptions = typeof(IndexerLimitsUnit), HelpText = "IndexerSettingsLimitsUnitHelpText", Advanced = true)]
public int LimitsUnit { get; set; } = (int)IndexerLimitsUnit.Day;
[FieldDefinition(4, Type = FieldType.Number, Label = "IndexerSettingsQueryTimeout", Unit = "seconds", HelpText = "IndexerSettingsQueryTimeoutHelpText", Advanced = true)]
public int? QueryTimeout { get; set; }
}
public enum IndexerLimitsUnit

View file

@ -428,6 +428,8 @@
"IndexerSettingsPreferMagnetUrlHelpText": "When enabled, this indexer will prefer the use of magnet URLs for grabs with fallback to torrent links",
"IndexerSettingsQueryLimit": "Query Limit",
"IndexerSettingsQueryLimitHelpText": "The number of max queries as specified by the respective unit that {appName} will allow to the site",
"IndexerSettingsQueryTimeout": "Query Timeout",
"IndexerSettingsQueryTimeoutHelpText": "Query timeout in seconds for this indexer. Default is 100s. Increase for slow indexers, decrease for faster failure detection",
"IndexerSettingsRssKey": "RSS Key",
"IndexerSettingsSeedRatio": "Seed Ratio",
"IndexerSettingsSeedRatioHelpText": "The ratio a torrent should reach before stopping, empty uses the download client's default. Ratio should be at least 1.0 and follow the indexers rules",