diff --git a/src/Jackett/Indexers/CardigannIndexer.cs b/src/Jackett/Indexers/CardigannIndexer.cs index ca94d4079..9bdf3aef2 100644 --- a/src/Jackett/Indexers/CardigannIndexer.cs +++ b/src/Jackett/Indexers/CardigannIndexer.cs @@ -24,6 +24,7 @@ namespace Jackett.Indexers { public class CardigannIndexer : BaseIndexer, IIndexer { + public string DefinitionString { get; protected set; } protected IndexerDefinition Definition; public new string ID { get { return (Definition != null ? Definition.Site : GetIndexerID(GetType())); } } @@ -144,6 +145,7 @@ namespace Jackett.Indexers protected void Init(string DefinitionString) { + this.DefinitionString = DefinitionString; var deserializer = new DeserializerBuilder() .WithNamingConvention(new CamelCaseNamingConvention()) .IgnoreUnmatchedProperties() diff --git a/src/Jackett/Services/IndexerManagerService.cs b/src/Jackett/Services/IndexerManagerService.cs index 776ad6a16..5e7cccaa9 100644 --- a/src/Jackett/Services/IndexerManagerService.cs +++ b/src/Jackett/Services/IndexerManagerService.cs @@ -140,7 +140,14 @@ namespace Jackett.Services var indexer = GetIndexer(name); var configPath = GetIndexerConfigFilePath(indexer); File.Delete(configPath); - indexers[name] = container.ResolveNamed(indexer.ID); + if (indexer.GetType() == typeof(CardigannIndexer)) + { + indexers[name] = new CardigannIndexer(this, container.Resolve(), logger, container.Resolve(), ((CardigannIndexer)indexer).DefinitionString); + } + else + { + indexers[name] = container.ResolveNamed(indexer.ID); + } } private string GetIndexerConfigFilePath(IIndexer indexer)