mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-18 19:00:47 +02:00
Add defaults definitions for indexer proxies
This commit is contained in:
parent
29ab1801db
commit
d9ce9eb0b2
1 changed files with 14 additions and 1 deletions
|
|
@ -14,7 +14,20 @@ public abstract class IndexerProxyBase<TSettings> : IIndexerProxy
|
|||
|
||||
public Type ConfigContract => typeof(TSettings);
|
||||
|
||||
public IEnumerable<ProviderDefinition> DefaultDefinitions => new List<ProviderDefinition>();
|
||||
public IEnumerable<ProviderDefinition> DefaultDefinitions
|
||||
{
|
||||
get
|
||||
{
|
||||
var config = (IProviderConfig)new TSettings();
|
||||
|
||||
yield return new IndexerProxyDefinition
|
||||
{
|
||||
Name = GetType().Name,
|
||||
Implementation = GetType().Name,
|
||||
Settings = config
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public ProviderDefinition Definition { get; set; }
|
||||
public abstract ValidationResult Test();
|
||||
|
|
|
|||
Loading…
Reference in a new issue