mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-21 22:25:03 -04:00
New: (Cardigann) Bump minimum version to v10
This commit is contained in:
@@ -60,7 +60,7 @@ namespace Prowlarr.Api.V1.Indexers
|
||||
|
||||
if (definition.Implementation == nameof(Cardigann))
|
||||
{
|
||||
var extraFields = definition.ExtraFields?.Select(MapField).ToList() ?? new List<Field>();
|
||||
var extraFields = definition.ExtraFields?.Select(MapCardigannField).ToList() ?? new List<Field>();
|
||||
|
||||
resource.Fields.AddRange(extraFields);
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace Prowlarr.Api.V1.Indexers
|
||||
};
|
||||
}
|
||||
|
||||
private Field MapField(SettingsField setting, int order)
|
||||
private Field MapCardigannField(SettingsField setting, int order)
|
||||
{
|
||||
var field = new Field
|
||||
{
|
||||
@@ -185,6 +185,26 @@ namespace Prowlarr.Api.V1.Indexers
|
||||
{
|
||||
field.Value = bool.TryParse(setting.Default, out var value) && value;
|
||||
}
|
||||
else if (setting.Type is "info_cookie" or "info_flaresolverr" or "info_useragent")
|
||||
{
|
||||
field.Type = "info";
|
||||
|
||||
switch (setting.Type)
|
||||
{
|
||||
case "info_cookie":
|
||||
field.Label = "How to get the Cookie";
|
||||
field.Value = "<ol><li>Login to this tracker with your browser</li><li>Open the <b>DevTools</b> panel by pressing <b>F12</b></li><li>Select the <b>Network</b> tab</li><li>Click on the <b>Doc</b> button (Chrome Browser) or <b>HTML</b> button (FireFox)</li><li>Refresh the page by pressing <b>F5</b></li><li>Click on the first row entry</li><li>Select the <b>Headers</b> tab on the Right panel</li><li>Find <b>'cookie:'</b> in the <b>Request Headers</b> section</li><li><b>Select</b> and <b>Copy</b> the whole cookie string <i>(everything after 'cookie: ')</i> and <b>Paste</b> here.</li></ol>";
|
||||
break;
|
||||
case "info_flaresolverr":
|
||||
field.Label = "FlareSolverr Info";
|
||||
field.Value = "This site may use Cloudflare DDoS Protection, therefore Prowlarr requires <a href=\"https://wiki.servarr.com/prowlarr/faq#can-i-use-flaresolverr-indexers\" target=\"_blank\" rel=\"noreferrer\">FlareSolverr</a> to access it.";
|
||||
break;
|
||||
case "info_useragent":
|
||||
field.Label = "How to get the User-Agent";
|
||||
field.Value = "<ol><li>From the same place you fetched the cookie,</li><li>Find <b>'user-agent:'</b> in the <b>Request Headers</b> section</li><li><b>Select</b> and <b>Copy</b> the whole user-agent string <i>(everything after 'user-agent: ')</i> and <b>Paste</b> here.</li></ol>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
field.Value = setting.Default;
|
||||
|
||||
Reference in New Issue
Block a user