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

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

@ -68,16 +68,9 @@ namespace NzbDrone.Core.ThingiProvider
{ {
var provider = _providers.First(v => v.GetType().Name == providerDefinition.Implementation); 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 var definitions = provider.DefaultDefinitions
.OfType<TProviderDefinition>() .OfType<TProviderDefinition>()
.Where(v => v.Name != null && v.Name != provider.GetType().Name) .Where(v => v.Name != null && v.Name != provider.Name)
.ToList(); .ToList();
return definitions; return definitions;

Loading…
Cancel
Save