mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-21 22:25:03 -04:00
New: Support for indexers with image CAPTCHAs
This commit is contained in:
@@ -78,6 +78,17 @@ namespace NzbDrone.Core.Indexers
|
||||
var settings = (CardigannSettings)definition.Settings;
|
||||
var defFile = _definitionService.GetDefinition(settings.DefinitionFile);
|
||||
definition.ExtraFields = defFile.Settings;
|
||||
|
||||
if (defFile.Login?.Captcha != null && !definition.ExtraFields.Any(x => x.Type == "cardigannCaptcha"))
|
||||
{
|
||||
definition.ExtraFields.Add(new SettingsField
|
||||
{
|
||||
Name = "cardigannCaptcha",
|
||||
Type = "cardigannCaptcha",
|
||||
Label = "CAPTCHA"
|
||||
});
|
||||
}
|
||||
|
||||
definition.BaseUrl = defFile.Links.First();
|
||||
definition.Privacy = defFile.Type == "private" ? IndexerPrivacy.Private : IndexerPrivacy.Public;
|
||||
definition.Capabilities = new IndexerCapabilities();
|
||||
|
||||
Reference in New Issue
Block a user