New: Rewrite of download decision engine.

This commit is contained in:
kay.one 2012-02-06 21:08:07 -08:00
commit 5717b7f596
60 changed files with 2013 additions and 1745 deletions

View file

@ -35,16 +35,7 @@ namespace NzbDrone
public void Route(ApplicationMode applicationMode)
{
Logger.Info("Application mode: {0}", applicationMode);
var batFiles = _diskProvider.GetFiles(_enviromentProvider.ApplicationPath, SearchOption.TopDirectoryOnly)
.Where(c => c.EndsWith(".bat", StringComparison.InvariantCultureIgnoreCase)).ToList();
foreach (var batFile in batFiles)
{
if (new FileInfo(batFile).Name.StartsWith("service", StringComparison.InvariantCultureIgnoreCase))
_diskProvider.DeleteFile(batFile);
}
Logger.Info("Application mode: {0}", applicationMode);
//TODO:move this outside, it should be one of application modes (ApplicationMode.Service?)
if (!_enviromentProvider.IsUserInteractive)