mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Fixed TestIndexer async Task
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user