1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-02-23 14:51:01 +00:00

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

View file

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