1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-20 21:55:03 -04:00

Reformat and apply Stylecop rules

This commit is contained in:
ta264
2019-12-22 22:08:53 +00:00
committed by Qstick
parent d4fa9b7345
commit f02fa629cc
1186 changed files with 7105 additions and 5616 deletions
@@ -1,15 +1,15 @@
using System.Collections.Generic;
using System.Linq;
using NLog;
using NzbDrone.Core.Messaging.Commands;
using NzbDrone.Core.MetadataSource;
using NzbDrone.Core.RootFolders;
using NzbDrone.Core.Movies;
using NzbDrone.Core.Configuration;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Download;
using NzbDrone.Core.IndexerSearch;
using NzbDrone.Core.Messaging.Commands;
using NzbDrone.Core.MetadataSource;
using NzbDrone.Core.Movies;
using NzbDrone.Core.NetImport.ImportExclusions;
using NzbDrone.Core.RootFolders;
namespace NzbDrone.Core.NetImport
{
@@ -31,10 +31,13 @@ namespace NzbDrone.Core.NetImport
private readonly IProcessDownloadDecisions _processDownloadDecisions;
private readonly IImportExclusionsService _exclusionService;
public NetImportSearchService(INetImportFactory netImportFactory, IMovieService movieService,
ISearchForNewMovie movieSearch, IRootFolderService rootFolder, ISearchForNzb nzbSearchService,
IProcessDownloadDecisions processDownloadDecisions, IConfigService configService,
public NetImportSearchService(INetImportFactory netImportFactory,
IMovieService movieService,
ISearchForNewMovie movieSearch,
IRootFolderService rootFolder,
ISearchForNzb nzbSearchService,
IProcessDownloadDecisions processDownloadDecisions,
IConfigService configService,
IImportExclusionsService exclusionService,
Logger logger)
{
@@ -49,7 +52,6 @@ namespace NzbDrone.Core.NetImport
_configService = configService;
}
public NetImportFetchResult Fetch(int listId, bool onlyEnableAuto = false)
{
return MovieListSearch(listId, onlyEnableAuto);
@@ -105,12 +107,10 @@ namespace NzbDrone.Core.NetImport
};
}
public void Execute(NetImportSyncCommand message)
{
//if there are no lists that are enabled for automatic import then dont do anything
if((_netImportFactory.GetAvailableProviders()).Where(a => ((NetImportDefinition)a.Definition).EnableAuto).Empty())
if (_netImportFactory.GetAvailableProviders().Where(a => ((NetImportDefinition)a.Definition).EnableAuto).Empty())
{
_logger.Info("No lists are enabled for auto-import.");
return;
@@ -182,8 +182,8 @@ namespace NzbDrone.Core.NetImport
foundMatch = true;
break;
}
}
if (!foundMatch)
{
switch (_configService.ListSyncLevel)
@@ -203,6 +203,7 @@ namespace NzbDrone.Core.NetImport
case "removeAndDelete":
_logger.Info("{0} was in your library, but not found in your lists --> Removing from library and deleting files", movie);
_movieService.DeleteMovie(movie.Id, true);
//TODO: for some reason the files are not deleted in this case... any idea why?
break;
default: