mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-26 02:12:39 +01:00
Fixed: Cardigann Indexer Descriptions & Indexer InfoLinks
This commit is contained in:
parent
7fb6c539d4
commit
bd79d3c828
3 changed files with 8 additions and 1 deletions
|
|
@ -118,6 +118,7 @@ private IndexerDefinition GetDefinition(CardigannMetaDefinition definition)
|
|||
Enable = true,
|
||||
Name = definition.Name,
|
||||
Language = definition.Language,
|
||||
Description = definition.Description,
|
||||
Implementation = GetType().Name,
|
||||
Settings = new CardigannSettings { DefinitionFile = definition.File },
|
||||
Protocol = DownloadProtocol.Torrent,
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ public override IndexerResource ToResource(IndexerDefinition definition)
|
|||
|
||||
var resource = base.ToResource(definition);
|
||||
|
||||
var infoLinkName = definition.ImplementationName;
|
||||
|
||||
if (definition.Implementation == typeof(Cardigann).Name)
|
||||
{
|
||||
var extraFields = definition.ExtraFields?.Select((x, i) => MapField(x, i)).ToList() ?? new List<Field>();
|
||||
|
|
@ -66,8 +68,11 @@ public override IndexerResource ToResource(IndexerDefinition definition)
|
|||
field.Value = setting.Value;
|
||||
}
|
||||
}
|
||||
|
||||
infoLinkName = settings.DefinitionFile;
|
||||
}
|
||||
|
||||
resource.InfoLink = string.Format("https://wiki.servarr.com/prowlarr/supported-indexers#{0}", infoLinkName.ToLower().Replace(' ', '-'));
|
||||
resource.AppProfileId = definition.AppProfileId;
|
||||
resource.BaseUrl = definition.BaseUrl;
|
||||
resource.Description = definition.Description;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,9 @@ public virtual TProviderResource ToResource(TProviderDefinition definition)
|
|||
Fields = SchemaBuilder.ToSchema(definition.Settings),
|
||||
|
||||
//prowlarr/supported#{0} are custom build redirect pages; if passing a new var, create a new redirect
|
||||
// note: indexers get a different link
|
||||
InfoLink = string.Format("https://wiki.servarr.com/prowlarr/supported#{0}",
|
||||
definition.Implementation.ToLower())
|
||||
definition.Implementation.ToLower().Replace(' ', '-'))
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue