diff --git a/frontend/src/Indexer/Edit/EditIndexerModalContent.js b/frontend/src/Indexer/Edit/EditIndexerModalContent.js index a17c5a040..08a097127 100644 --- a/frontend/src/Indexer/Edit/EditIndexerModalContent.js +++ b/frontend/src/Indexer/Edit/EditIndexerModalContent.js @@ -39,6 +39,7 @@ function EditIndexerModalContent(props) { const { id, implementationName, + definitionName, name, enable, redirect, @@ -50,10 +51,12 @@ function EditIndexerModalContent(props) { priority } = item; + const indexerDisplayName = implementationName === definitionName ? implementationName : `${implementationName} (${definitionName})`; + return ( - {`${id ? translate('EditIndexer') : translate('AddIndexer')} - ${implementationName}`} + {`${id ? translate('EditIndexer') : translate('AddIndexer')} - ${indexerDisplayName}`} diff --git a/frontend/src/Store/Selectors/selectSettings.js b/frontend/src/Store/Selectors/selectSettings.js index 3e30478b7..94eea8e55 100644 --- a/frontend/src/Store/Selectors/selectSettings.js +++ b/frontend/src/Store/Selectors/selectSettings.js @@ -36,6 +36,12 @@ function selectSettings(item, pendingChanges, saveError) { return result; } + if (key === 'definitionName') { + result.definitionName = item[key]; + + return result; + } + const setting = { value: item[key], errors: _.map(_.remove(validationFailures, (failure) => { diff --git a/src/Prowlarr.Api.V1/Indexers/IndexerResource.cs b/src/Prowlarr.Api.V1/Indexers/IndexerResource.cs index 15808253e..3cd433e29 100644 --- a/src/Prowlarr.Api.V1/Indexers/IndexerResource.cs +++ b/src/Prowlarr.Api.V1/Indexers/IndexerResource.cs @@ -15,6 +15,7 @@ namespace Prowlarr.Api.V1.Indexers public class IndexerResource : ProviderResource { public string[] IndexerUrls { get; set; } + public string DefinitionName { get; set; } public string Description { get; set; } public string Language { get; set; } public string Encoding { get; set; } @@ -51,6 +52,8 @@ namespace Prowlarr.Api.V1.Indexers var resource = base.ToResource(definition); + resource.DefinitionName = definition.ImplementationName; + var infoLinkName = definition.ImplementationName; if (definition.Implementation == typeof(Cardigann).Name) @@ -71,6 +74,7 @@ namespace Prowlarr.Api.V1.Indexers } } + resource.DefinitionName = settings.DefinitionFile; infoLinkName = settings.DefinitionFile; }