mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-05 03:00:21 +02:00
Add default definitions for download clients
This commit is contained in:
parent
88e793d76d
commit
98db8f8bf8
1 changed files with 14 additions and 1 deletions
|
|
@ -27,7 +27,20 @@ public abstract class DownloadClientBase<TSettings> : IDownloadClient
|
|||
|
||||
public virtual ProviderMessage Message => null;
|
||||
|
||||
public IEnumerable<ProviderDefinition> DefaultDefinitions => new List<ProviderDefinition>();
|
||||
public IEnumerable<ProviderDefinition> DefaultDefinitions
|
||||
{
|
||||
get
|
||||
{
|
||||
var config = (IProviderConfig)new TSettings();
|
||||
|
||||
yield return new DownloadClientDefinition
|
||||
{
|
||||
Name = GetType().Name,
|
||||
Implementation = GetType().Name,
|
||||
Settings = config
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public ProviderDefinition Definition { get; set; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue