New: Loads of Backend Updates to Clients and Indexers

This commit is contained in:
Qstick
2019-06-13 23:54:25 -04:00
parent c48838e5b6
commit 8a9e2dc90d
345 changed files with 5859 additions and 2669 deletions
+11 -15
View File
@@ -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);
}