New: Set default names for providers in Add Modals

This commit is contained in:
Bogdan
2023-07-27 02:58:07 +03:00
parent b3a541c9ff
commit 3b5f151252
9 changed files with 21 additions and 33 deletions

View File

@@ -46,7 +46,6 @@ namespace NzbDrone.Core.Applications
yield return new ApplicationDefinition
{
Name = GetType().Name,
SyncLevel = ApplicationSyncLevel.FullSync,
Implementation = GetType().Name,
Settings = config

View File

@@ -27,20 +27,7 @@ namespace NzbDrone.Core.Download
public virtual ProviderMessage Message => null;
public IEnumerable<ProviderDefinition> DefaultDefinitions
{
get
{
var config = (IProviderConfig)new TSettings();
yield return new DownloadClientDefinition
{
Name = GetType().Name,
Implementation = GetType().Name,
Settings = config
};
}
}
public IEnumerable<ProviderDefinition> DefaultDefinitions => new List<ProviderDefinition>();
public ProviderDefinition Definition { get; set; }

View File

@@ -14,20 +14,7 @@ namespace NzbDrone.Core.IndexerProxies
public Type ConfigContract => typeof(TSettings);
public IEnumerable<ProviderDefinition> DefaultDefinitions
{
get
{
var config = (IProviderConfig)new TSettings();
yield return new IndexerProxyDefinition
{
Name = GetType().Name,
Implementation = GetType().Name,
Settings = config
};
}
}
public IEnumerable<ProviderDefinition> DefaultDefinitions => new List<ProviderDefinition>();
public ProviderDefinition Definition { get; set; }
public abstract ValidationResult Test();