2017-09-04 02:20:56 +00:00
|
|
|
|
using NzbDrone.Core.Indexers;
|
|
|
|
|
|
2017-10-31 01:28:29 +00:00
|
|
|
|
namespace Lidarr.Api.V1.Indexers
|
2017-09-04 02:20:56 +00:00
|
|
|
|
{
|
|
|
|
|
public class IndexerModule : ProviderModuleBase<IndexerResource, IIndexer, IndexerDefinition>
|
|
|
|
|
{
|
|
|
|
|
public static readonly IndexerResourceMapper ResourceMapper = new IndexerResourceMapper();
|
|
|
|
|
|
|
|
|
|
public IndexerModule(IndexerFactory indexerFactory)
|
|
|
|
|
: base(indexerFactory, "indexer", ResourceMapper)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Validate(IndexerDefinition definition, bool includeWarnings)
|
|
|
|
|
{
|
2020-01-03 12:49:24 +00:00
|
|
|
|
if (!definition.Enable)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-04 02:20:56 +00:00
|
|
|
|
base.Validate(definition, includeWarnings);
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-01-03 12:49:24 +00:00
|
|
|
|
}
|