New: Support for indexers with image CAPTCHAs

This commit is contained in:
ta264
2021-03-17 21:30:11 +00:00
committed by Qstick
parent 95d5e0d347
commit 0fa526a1af
15 changed files with 314 additions and 159 deletions
@@ -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();