core: allow renaming & merging of trackers with config (part 1 #8355) (#8608)

core: allow renaming & merging of trackers with config (part 1 #8355) (#8608)

* rename site field to id in yaml indexers
* add id field in c# indexers
* use id field instead of class name in c#
This commit is contained in:
Diego Heras
2020-05-11 21:59:28 +02:00
committed by GitHub
parent 121b7866a2
commit 6156ad0cd5
535 changed files with 1160 additions and 1006 deletions

View File

@@ -94,12 +94,12 @@ namespace Jackett.Common.Services
if (string.IsNullOrWhiteSpace(content))
{
throw new Exception(string.Format("New config content for {0} is empty, please report this bug.", indexer.ID));
throw new Exception(string.Format("New config content for {0} is empty, please report this bug.", indexer.Id));
}
if (content.Contains("\x00"))
{
throw new Exception(string.Format("New config content for {0} contains 0x00, please report this bug. Content: {1}", indexer.ID, content));
throw new Exception(string.Format("New config content for {0} contains 0x00, please report this bug. Content: {1}", indexer.Id, content));
}
// make sure the config directory exists
@@ -141,7 +141,7 @@ namespace Jackett.Common.Services
}
}
private string GetIndexerConfigFilePath(IIndexer indexer) => Path.Combine(configService.GetIndexerConfigDir(), indexer.ID + ".json");
private string GetIndexerConfigFilePath(IIndexer indexer) => Path.Combine(configService.GetIndexerConfigDir(), indexer.Id + ".json");
private readonly IConfigurationService configService;
private readonly Logger logger;