Fix up presets.

Leonardo Galli 8 years ago
parent 0bab97e02f
commit ad26e48408

@ -22,7 +22,7 @@ namespace NzbDrone.Core.NetImport.CouchPotato
: base(httpClient, configService, parsingService, logger)
{ }
public new virtual IEnumerable<ProviderDefinition> DefaultDefinitions
/*public new virtual IEnumerable<ProviderDefinition> DefaultDefinitions
{
get
{
@ -38,7 +38,7 @@ namespace NzbDrone.Core.NetImport.CouchPotato
Settings = config
};
}
}
}*/
public override INetImportRequestGenerator GetRequestGenerator()
{

@ -43,7 +43,7 @@ namespace NzbDrone.Core.NetImport
yield return new NetImportDefinition
{
Name = GetType().Name,
Name = this.Name,
Enabled = config.Validate().IsValid && Enabled,
Implementation = GetType().Name,
Settings = config

@ -68,16 +68,9 @@ namespace NzbDrone.Core.ThingiProvider
{
var provider = _providers.First(v => v.GetType().Name == providerDefinition.Implementation);
var defs = provider.DefaultDefinitions.OfType<TProviderDefinition>();
foreach (var def in defs)
{
_logger.Debug(def);
}
var definitions = provider.DefaultDefinitions
.OfType<TProviderDefinition>()
.Where(v => v.Name != null && v.Name != provider.GetType().Name)
.Where(v => v.Name != null && v.Name != provider.Name)
.ToList();
return definitions;

Loading…
Cancel
Save