Change indexers to use new api

This commit is contained in:
KZ
2015-07-19 18:18:54 +01:00
parent 9b1c0eb0c0
commit 75f0cce064
37 changed files with 532 additions and 957 deletions

View File

@@ -34,7 +34,7 @@ namespace Jackett.Controllers
}
[Route("get_config_form")]
[HttpGet]
[HttpPost]
public async Task<IHttpActionResult> GetConfigForm()
{
var jsonReply = new JObject();
@@ -99,7 +99,7 @@ namespace Jackett.Controllers
foreach (var indexer in indexerService.GetAllIndexers())
{
var item = new JObject();
item["id"] = indexer.GetType().Name.ToLowerInvariant();
item["id"] = indexer.GetType().Name;
item["name"] = indexer.DisplayName;
item["description"] = indexer.DisplayDescription;
item["configured"] = indexer.IsConfigured;
@@ -126,6 +126,7 @@ namespace Jackett.Controllers
var postData = await ReadPostDataJson();
string indexerString = (string)postData["indexer"];
indexerService.TestIndexer(indexerString);
jsonReply["name"] = indexerService.GetIndexer(indexerString).DisplayName;
jsonReply["result"] = "success";
}
catch (Exception ex)