mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Show Indexer Status on Indexer Table
This commit is contained in:
23
src/Prowlarr.Api.V1/Indexers/IndexerStatusModule.cs
Normal file
23
src/Prowlarr.Api.V1/Indexers/IndexerStatusModule.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user