Fixed TestIndexer async Task

This commit is contained in:
unknown 2015-07-19 12:25:47 -06:00
parent 3f4f8c795e
commit c39feb7997
2 changed files with 7 additions and 7 deletions

View File

@ -20,7 +20,7 @@ namespace Jackett.Controllers
private IIndexerManagerService indexerService;
private IServerService serverService;
public AdminController(IConfigurationService config, IIndexerManagerService i, IServerService ss)
public AdminController(IConfigurationService config, IIndexerManagerService i, IServerService ss)
{
this.config = config;
indexerService = i;
@ -67,7 +67,7 @@ namespace Jackett.Controllers
var indexer = indexerService.GetIndexer((string)postData["indexer"]);
jsonReply["name"] = indexer.DisplayName;
await indexer.ApplyConfiguration(postData["config"]);
indexerService.TestIndexer((string)postData["indexer"]);
await indexerService.TestIndexer((string)postData["indexer"]);
jsonReply["result"] = "success";
}
catch (Exception ex)
@ -125,7 +125,7 @@ namespace Jackett.Controllers
{
var postData = await ReadPostDataJson();
string indexerString = (string)postData["indexer"];
indexerService.TestIndexer(indexerString);
await indexerService.TestIndexer(indexerString);
jsonReply["name"] = indexerService.GetIndexer(indexerString).DisplayName;
jsonReply["result"] = "success";
}
@ -187,9 +187,9 @@ namespace Jackett.Controllers
try
{
var postData = await ReadPostDataJson();
// int port = await WebServer.ApplyPortConfiguration(postData);
// int port = await WebServer.ApplyPortConfiguration(postData);
jsonReply["result"] = "success";
// jsonReply["port"] = port;
// jsonReply["port"] = port;
}
catch (Exception ex)
{

View File

@ -15,7 +15,7 @@ namespace Jackett.Services
{
public interface IIndexerManagerService
{
void TestIndexer(string name);
Task TestIndexer(string name);
void DeleteIndexer(string name);
IIndexer GetIndexer(string name);
IEnumerable<IIndexer> GetAllIndexers();
@ -70,7 +70,7 @@ namespace Jackett.Services
return indexers.Values;
}
public async void TestIndexer(string name)
public async Task TestIndexer(string name)
{
var indexer = GetIndexer(name);
var browseQuery = new TorznabQuery();