1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-21 22:05:38 -04:00

New: Drone now uses the Download Client API to determine if a download is ready for import. (User configuration is required to replace the drone factory with this feature)

This commit is contained in:
Taloth Saldono
2014-04-19 17:09:22 +02:00
parent dcb586b937
commit 2035fe8578
196 changed files with 3961 additions and 2223 deletions
+9 -10
View File
@@ -31,17 +31,7 @@ namespace NzbDrone.Core.Indexers
protected override void InitializeProviders()
{
var definitions = _providers.Where(c => c.Protocol == DownloadProtocol.Usenet)
.SelectMany(indexer => indexer.DefaultDefinitions);
var currentProviders = All();
var newProviders = definitions.Where(def => currentProviders.All(c => c.Implementation != def.Implementation)).ToList();
if (newProviders.Any())
{
_providerRepository.InsertMany(newProviders.Cast<IndexerDefinition>().ToList());
}
}
protected override List<IndexerDefinition> Active()
@@ -59,5 +49,14 @@ namespace NzbDrone.Core.Indexers
return base.Create(definition);
}
protected override IndexerDefinition GetTemplate(IIndexer provider)
{
var definition = base.GetTemplate(provider);
definition.Protocol = provider.Protocol;
return definition;
}
}
}