|
|
@ -4,7 +4,7 @@ using NzbDrone.Core.ThingiProvider;
|
|
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Indexers
|
|
|
|
namespace NzbDrone.Core.Indexers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public abstract class IndexerBase<TSettings> : IIndexer
|
|
|
|
public abstract class IndexerBase<TSettings> : IIndexer where TSettings : IProviderConfig, new()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public Type ConfigContract
|
|
|
|
public Type ConfigContract
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -18,12 +18,14 @@ namespace NzbDrone.Core.Indexers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get
|
|
|
|
get
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
var config = (IProviderConfig)new TSettings();
|
|
|
|
|
|
|
|
|
|
|
|
yield return new IndexerDefinition
|
|
|
|
yield return new IndexerDefinition
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Name = this.GetType().Name,
|
|
|
|
Name = GetType().Name,
|
|
|
|
Enable = false,
|
|
|
|
Enable = config.Validate().IsValid,
|
|
|
|
Implementation = GetType().Name,
|
|
|
|
Implementation = GetType().Name,
|
|
|
|
Settings = NullConfig.Instance
|
|
|
|
Settings = config
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|