Show Indexer Status on Indexer Table

This commit is contained in:
Qstick
2021-02-11 21:54:00 -05:00
parent a41ae141cd
commit 56d5356f1e
10 changed files with 174 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
using System.Collections.Generic;
using NzbDrone.Core.Indexers;
using Prowlarr.Http;
namespace Prowlarr.Api.V1.Indexers
{
public class IndexerStatusModule : ProwlarrRestModule<IndexerStatusResource>
{
private readonly IIndexerStatusService _indexerStatusService;
public IndexerStatusModule(IIndexerStatusService indexerStatusService)
{
_indexerStatusService = indexerStatusService;
GetResourceAll = GetAll;
}
private List<IndexerStatusResource> GetAll()
{
return _indexerStatusService.GetBlockedProviders().ToResource();
}
}
}