mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-21 22:25:03 -04:00
New: Loads of Backend Updates to Clients and Indexers
This commit is contained in:
@@ -13,7 +13,7 @@ using NzbDrone.Core.ThingiProvider;
|
||||
namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
public abstract class IndexerBase<TSettings> : IIndexer
|
||||
where TSettings : IProviderConfig, new()
|
||||
where TSettings : IIndexerSettings, new()
|
||||
{
|
||||
protected readonly IIndexerStatusService _indexerStatusService;
|
||||
protected readonly IConfigService _configService;
|
||||
@@ -44,15 +44,16 @@ namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
var config = (IProviderConfig)new TSettings();
|
||||
|
||||
yield return new IndexerDefinition
|
||||
{
|
||||
Name = GetType().Name,
|
||||
EnableRss = config.Validate().IsValid && SupportsRss,
|
||||
EnableSearch = config.Validate().IsValid && SupportsSearch,
|
||||
Implementation = GetType().Name,
|
||||
Settings = config
|
||||
};
|
||||
}
|
||||
yield return new IndexerDefinition
|
||||
{
|
||||
Name = GetType().Name,
|
||||
EnableRss = config.Validate().IsValid && SupportsRss,
|
||||
EnableAutomaticSearch = config.Validate().IsValid && SupportsSearch,
|
||||
EnableInteractiveSearch = config.Validate().IsValid && SupportsSearch,
|
||||
Implementation = GetType().Name,
|
||||
Settings = config
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public virtual ProviderDefinition Definition { get; set; }
|
||||
@@ -92,11 +93,6 @@ namespace NzbDrone.Core.Indexers
|
||||
failures.Add(new ValidationFailure(string.Empty, "Test was aborted due to an error: " + ex.Message));
|
||||
}
|
||||
|
||||
if (Definition.Id != 0)
|
||||
{
|
||||
_indexerStatusService.RecordSuccess(Definition.Id);
|
||||
}
|
||||
|
||||
return new ValidationResult(failures);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user