From d4fa9b73451b98f7c7d8489174e42a29545e2bdb Mon Sep 17 00:00:00 2001 From: ta264 Date: Sun, 22 Dec 2019 21:24:11 +0000 Subject: [PATCH] Remove trailing whitespace --- src/Common/CommonAssemblyInfo.cs | 2 +- src/Common/GlobalSuppressions.cs | 8 +-- src/Directory.Build.props | 13 +++- src/Marr.Data/DataHelper.cs | 18 +++--- src/Marr.Data/DataMapper.cs | 6 +- src/Marr.Data/EntityGraph.cs | 4 +- src/Marr.Data/IDataMapper.cs | 6 +- src/Marr.Data/MapRepository.cs | 6 +- src/Marr.Data/Mapping/ColumnMapBuilder.cs | 2 +- src/Marr.Data/Mapping/ColumnMapCollection.cs | 6 +- src/Marr.Data/Mapping/FluentMappings.cs | 4 +- src/Marr.Data/Mapping/IColumnInfo.cs | 2 +- src/Marr.Data/Mapping/MapBuilder.cs | 20 +++--- src/Marr.Data/Mapping/RelationshipBuilder.cs | 2 +- .../Strategies/ConventionMapStrategy.cs | 4 +- .../Mapping/Strategies/PropertyMapStrategy.cs | 2 +- .../Strategies/ReflectionMapStrategyBase.cs | 4 +- src/Marr.Data/Parameters/IDbTypeBuilder.cs | 2 +- .../Parameters/ParameterChainMethods.cs | 8 +-- src/Marr.Data/QGen/DeleteQuery.cs | 2 +- src/Marr.Data/QGen/ExpressionVisitor.cs | 2 +- src/Marr.Data/QGen/InsertQueryBuilder.cs | 2 +- src/Marr.Data/QGen/JoinBuilder.cs | 2 +- src/Marr.Data/QGen/PagingQueryDecorator.cs | 6 +- src/Marr.Data/QGen/QueryBuilder.cs | 6 +- src/Marr.Data/QGen/QueryFactory.cs | 2 +- src/Marr.Data/QGen/RowCountQueryDecorator.cs | 12 ++-- src/Marr.Data/QGen/SelectQuery.cs | 2 +- src/Marr.Data/QGen/SortBuilder.cs | 2 +- src/Marr.Data/QGen/SortColumn.cs | 2 +- .../QGen/SqliteRowCountQueryDecorator.cs | 6 +- src/Marr.Data/QGen/UpdateQueryBuilder.cs | 2 +- src/Marr.Data/QGen/View.cs | 2 +- src/Marr.Data/QGen/WhereBuilder.cs | 14 ++--- src/Marr.Data/Reflection/ReflectionHelper.cs | 2 +- src/Marr.Data/UnitOfWork.cs | 2 +- src/Marr.Data/UnitOfWorkSharedContext.cs | 2 +- .../BEncoding/BEncodedDictionary.cs | 4 +- src/MonoTorrent/BEncoding/BEncodedList.cs | 2 +- src/MonoTorrent/BEncoding/BEncodedNumber.cs | 8 +-- src/MonoTorrent/BEncoding/IBEncodedValue.cs | 4 +- src/MonoTorrent/Hashes.cs | 2 +- src/MonoTorrent/InfoHash.cs | 4 +- src/MonoTorrent/ToolBox.cs | 2 +- src/MonoTorrent/Torrent.cs | 8 +-- .../Calendar/CalendarFeedModule.cs | 4 +- src/NzbDrone.Api/Config/UiConfigResource.cs | 2 +- src/NzbDrone.Api/Indexers/IndexerModule.cs | 2 +- src/NzbDrone.Api/Indexers/ReleaseModule.cs | 6 +- src/NzbDrone.Api/Logs/LogFileModuleBase.cs | 4 +- .../Movies/AlternativeTitleResource.cs | 2 +- .../Movies/AlternativeYearResource.cs | 2 +- src/NzbDrone.Api/Movies/MovieResource.cs | 18 +++--- .../NetImport/ImportExclusionsModule.cs | 2 +- .../Notifications/NotificationModule.cs | 2 +- src/NzbDrone.Api/Queue/QueueActionModule.cs | 2 +- src/NzbDrone.Api/Wanted/MovieMissingModule.cs | 6 +- .../DirectoryLookupServiceFixture.cs | 2 +- .../DiskTests/FreeSpaceFixtureBase.cs | 2 +- .../StartupArgumentsFixture.cs | 2 +- src/NzbDrone.Common/Disk/DiskProviderBase.cs | 2 +- src/NzbDrone.Common/Disk/OsPath.cs | 6 +- .../Resources/ExceptionMessages.Designer.cs | 46 +++++++------- .../EnvironmentInfo/AppFolderFactory.cs | 2 +- .../Extensions/DateTimeExtensions.cs | 2 +- src/NzbDrone.Common/Http/HttpAccept.cs | 2 +- .../Instrumentation/CleanseLogMessage.cs | 2 +- .../Instrumentation/Sentry/SentryTarget.cs | 4 +- src/NzbDrone.Common/OAuth/OAuthTools.cs | 14 ++--- .../OAuth/WebParameterCollection.cs | 4 +- .../LimitedConcurrencyLevelTaskScheduler.cs | 62 +++++++++---------- src/NzbDrone.Common/TinyIoC.cs | 42 ++++++------- .../Datastore/MappingExtentionFixture.cs | 2 +- .../Migration/079_dedupe_tagsFixture.cs | 2 +- .../085_expand_transmission_urlbaseFixture.cs | 2 +- .../086_pushbullet_device_idsFixture.cs | 4 +- .../090_update_kickass_urlFixture.cs | 2 +- .../SqliteSchemaDumperFixture.cs | 2 +- .../ProtocolSpecificationFixture.cs | 2 +- .../RawDiskSpecificationFixture.cs | 2 +- .../DownloadApprovedFixture.cs | 2 +- .../DelugeTests/DelugeFixture.cs | 8 +-- .../QBittorrentTests/QBittorrentFixture.cs | 2 +- .../TransmissionFixtureBase.cs | 8 +-- .../Download/DownloadServiceFixture.cs | 8 +-- .../RemoveRejectedFixture.cs | 2 +- src/NzbDrone.Core.Test/FluentTest.cs | 34 +++++----- .../Framework/DirectDataMapper.cs | 2 +- .../Checks/ImportMechanismCheckFixture.cs | 4 +- .../NewznabTests/NewznabFixture.cs | 2 +- .../OmgwtfnzbsTests/OmgwtfnzbsFixture.cs | 2 +- .../TestTorrentRssIndexer.cs | 4 +- .../MediaCoverServiceFixture.cs | 4 +- .../UpdateMediaInfoServiceFixture.cs | 8 +-- .../Aggregators/AggregateLanguageFixture.cs | 2 +- .../Aggregators/AggregateQualityFixture.cs | 2 +- .../UpdateMovieFileQualityServiceFixture.cs | 2 +- .../Events/EventAggregatorFixture.cs | 4 +- .../NotificationBaseFixture.cs | 2 +- .../Xbmc/GetMoviePathFixture.cs | 2 +- .../Xbmc/OnDownloadFixture.cs | 2 +- .../ParserTests/NormalizeTitleFixture.cs | 4 +- .../ParserTests/QualityParserFixture.cs | 2 +- .../ParserTests/ReleaseGroupParserFixture.cs | 2 +- .../Delay/DelayProfileServiceFixture.cs | 2 +- .../RecycleBinProviderTests/CleanupFixture.cs | 2 +- .../RecycleBinProviderTests/EmptyFixture.cs | 4 +- .../RemotePathMappingServiceFixture.cs | 2 +- .../Blacklisting/BlacklistService.cs | 2 +- .../CustomFormats/CustomFormatService.cs | 4 +- .../Datastore/ConnectionStringFactory.cs | 2 +- .../Converters/CustomFormatIntConverter.cs | 2 +- .../Datastore/Extensions/MappingExtensions.cs | 2 +- .../Extensions/PagingSpecExtensions.cs | 2 +- .../Extensions/RelationshipExtensions.cs | 4 +- .../029_add_formats_to_naming_config.cs | 2 +- .../Datastore/Migration/045_add_indexes.cs | 4 +- .../Migration/051_download_client_import.cs | 2 +- .../Datastore/Migration/070_delay_profile.cs | 2 +- .../085_expand_transmission_urlbase.cs | 2 +- .../109_add_movie_formats_to_naming_config.cs | 4 +- .../110_add_physical_release_to_table.cs | 4 +- .../126_update_qualities_and_profiles.cs | 2 +- .../Migration/141_fix_duplicate_alt_titles.cs | 2 +- .../144_add_cookies_to_indexer_status.cs | 2 +- .../Migration/159_add_webrip_qualities.cs | 2 +- .../Migration/Framework/SqliteSchemaDumper.cs | 4 +- .../DecisionEngine/DownloadDecision.cs | 4 +- .../QualityAllowedByProfileSpecification.cs | 2 +- .../RssSync/DelaySpecification.cs | 6 +- .../RssSync/HistorySpecification.cs | 2 +- .../RssSync/ProperSpecification.cs | 2 +- .../UpgradeDiskSpecification.cs | 2 +- .../Download/Clients/Deluge/DelugeTorrent.cs | 4 +- .../DownloadStation/DiskStationApiInfo.cs | 2 +- .../Proxies/FileStationProxy.cs | 2 +- .../Download/Clients/Hadouken/Hadouken.cs | 2 +- .../Clients/Hadouken/HadoukenProxy.cs | 2 +- .../Clients/NzbVortex/NzbVortexProxy.cs | 8 +-- .../Download/Clients/Nzbget/NzbgetSettings.cs | 2 +- .../QBittorrent/QBittorrentProxySelector.cs | 4 +- .../Clients/Transmission/TransmissionBase.cs | 2 +- .../Clients/uTorrent/UTorrentTorrent.cs | 4 +- .../Clients/uTorrent/UTorrentTorrentCache.cs | 2 +- .../Download/DownloadClientBase.cs | 2 +- .../Download/DownloadEventHub.cs | 2 +- .../Download/DownloadFailedEvent.cs | 2 +- .../Download/FailedDownloadService.cs | 2 +- src/NzbDrone.Core/Download/IDownloadClient.cs | 2 +- .../Download/TorrentClientBase.cs | 2 +- .../Download/UsenetClientBase.cs | 2 +- .../Extras/Files/ExtraFileManager.cs | 2 +- .../Roksbox/RoksboxMetadataSettings.cs | 2 +- .../Consumers/Wdtv/WdtvMetadataSettings.cs | 2 +- .../Metadata/Consumers/Xbmc/XbmcMetadata.cs | 2 +- .../Extras/Metadata/MetadataBase.cs | 2 +- .../Extras/Metadata/MetadataService.cs | 2 +- .../Extras/Others/OtherExtraService.cs | 2 +- .../HealthCheck/Checks/PTPOldSettingsCheck.cs | 6 +- .../HealthCheck/HealthCheckFailedEvent.cs | 2 +- .../HealthCheck/HealthCheckService.cs | 2 +- .../Http/HttpProxySettingsProvider.cs | 2 +- .../Indexers/AwesomeHD/AwesomeHDSettings.cs | 2 +- .../Indexers/HDBits/HDBitsRequestGenerator.cs | 2 +- .../Indexers/HDBits/HDBitsSettings.cs | 2 +- src/NzbDrone.Core/Indexers/HttpIndexerBase.cs | 4 +- .../Indexers/IIndexerSettings.cs | 2 +- .../IPTorrents/IPTorrentsRequestGenerator.cs | 6 +- .../Indexers/IPTorrents/IPTorrentsSettings.cs | 2 +- src/NzbDrone.Core/Indexers/IndexerStatus.cs | 2 +- src/NzbDrone.Core/Indexers/Newznab/Newznab.cs | 4 +- .../Newznab/NewznabRequestGenerator.cs | 2 +- .../Indexers/Nyaa/NyaaRequestGenerator.cs | 2 +- .../Indexers/Nyaa/NyaaSettings.cs | 2 +- .../Omgwtfnzbs/OmgwtfnzbsRequestGenerator.cs | 4 +- .../Indexers/Omgwtfnzbs/OmgwtfnzbsSettings.cs | 2 +- .../PassThePopcornRequestGenerator.cs | 2 +- .../PassThePopcorn/PassThePopcornSettings.cs | 4 +- src/NzbDrone.Core/Indexers/Rarbg/Rarbg.cs | 2 +- .../Indexers/Rarbg/RarbgRequestGenerator.cs | 4 +- .../Indexers/Rarbg/RarbgSettings.cs | 2 +- .../Indexers/RssIndexerRequestGenerator.cs | 2 +- .../Indexers/TorrentPotato/TorrentPotato.cs | 2 +- .../TorrentPotato/TorrentPotatoParser.cs | 2 +- .../TorrentPotatoRequestGenerator.cs | 2 +- .../TorrentPotato/TorrentPotatoSettings.cs | 4 +- .../TorrentRssIndexerRequestGenerator.cs | 4 +- .../TorrentRss/TorrentRssIndexerSettings.cs | 2 +- .../TorrentRss/TorrentRssParserFactory.cs | 2 +- .../TorrentRss/TorrentRssSettingsDetector.cs | 2 +- src/NzbDrone.Core/Indexers/Torznab/Torznab.cs | 4 +- .../Indexers/Torznab/TorznabSettings.cs | 2 +- .../Instrumentation/DatabaseTarget.cs | 2 +- src/NzbDrone.Core/Jobs/TaskManager.cs | 2 +- src/NzbDrone.Core/Languages/Language.cs | 2 +- .../MediaCover/EnsureMediaCoversCommand.cs | 2 +- .../MediaCover/MediaCoverService.cs | 2 +- .../Commands/UpdateMovieFileQualityCommand.cs | 2 +- .../MediaFiles/Events/MovieImportedEvent.cs | 2 +- .../MediaInfo/MediaInfoFormatter.cs | 2 +- .../MovieImport/ImportDecisionMaker.cs | 2 +- .../TorrentInfo/TorrentFileInfoReader.cs | 2 +- .../Messaging/Commands/CommandExecutor.cs | 2 +- .../Messaging/Commands/CommandQueueManager.cs | 8 +-- .../MetadataSource/PreDB/PreDBService.cs | 8 +-- .../RadarrAPI/RadarrAPIClient.cs | 10 +-- .../RadarrAPI/RadarrResources.cs | 8 +-- .../MetadataSource/SearchMovieComparer.cs | 6 +- .../MetadataSource/SkyHook/SkyHookProxy.cs | 2 +- .../AlternativeTitles/AlternativeTitle.cs | 20 +++--- src/NzbDrone.Core/Movies/MovieRepository.cs | 4 +- .../Movies/RefreshMovieService.cs | 2 +- src/NzbDrone.Core/NetImport/NetImportBase.cs | 2 +- .../NetImport/NetImportFactory.cs | 2 +- .../NetImport/NetImportRepository.cs | 2 +- .../NetImport/Radarr/RadarrParser.cs | 2 +- .../NetImport/Trakt/TraktImport.cs | 6 +- .../Notifications/Email/EmailService.cs | 2 +- src/NzbDrone.Core/Notifications/Join/Join.cs | 2 +- .../Notifications/Join/JoinProxy.cs | 4 +- .../MediaBrowser/MediaBrowserProxy.cs | 2 +- .../Notifications/NotificationService.cs | 4 +- .../NotifyMyAndroid/NotifyMyAndroid.cs | 2 +- .../Plex/Server/PlexServerProxy.cs | 2 +- .../Notifications/Pushalot/Pushalot.cs | 2 +- .../Notifications/Pushalot/PushalotProxy.cs | 2 +- .../Notifications/Pushover/Pushover.cs | 2 +- .../Notifications/Slack/Slack.cs | 4 +- .../Notifications/Twitter/TwitterService.cs | 4 +- .../Organizer/FileNameBuilder.cs | 2 +- .../FileNameBuilderTokenEqualityComparer.cs | 2 +- src/NzbDrone.Core/Parser/Parser.cs | 2 +- src/NzbDrone.Core/Parser/QualityParser.cs | 2 +- .../Parser/RomanNumerals/RomanNumeral.cs | 4 +- .../RomanNumerals/RomanNumeralParser.cs | 2 +- .../Profiles/Delay/DelayProfileRepository.cs | 2 +- .../Profiles/Delay/DelayProfileService.cs | 6 +- .../ProgressMessageContext.cs | 2 +- .../ProgressMessageTarget.cs | 2 +- src/NzbDrone.Core/Qualities/Quality.cs | 2 +- src/NzbDrone.Core/Qualities/QualityFinder.cs | 2 +- src/NzbDrone.Core/Qualities/Revision.cs | 2 +- src/NzbDrone.Core/Queue/QueueService.cs | 2 +- src/NzbDrone.Core/Tags/TagService.cs | 2 +- src/NzbDrone.Core/TinyTwitter.cs | 6 +- .../Paths/MappedNetworkDriveValidator.cs | 2 +- .../Paths/StartupFolderValidator.cs | 2 +- src/NzbDrone.Host/ApplicationServer.cs | 2 +- src/NzbDrone.Host/Bootstrap.cs | 2 +- src/NzbDrone.Host/CancelHandler.cs | 16 ++--- .../ApiTests/FileSystemFixture.cs | 4 +- .../ApiTests/ReleaseFixture.cs | 4 +- .../Client/CommandClient.cs | 2 +- .../Disk/SymbolicLinkResolver.cs | 2 +- .../IssueFileVersionAdapter.cs | 2 +- src/NzbDrone.Windows/Disk/DiskProvider.cs | 4 +- src/NzbDrone/Properties/Resources.Designer.cs | 12 ++-- .../Calendar/CalendarFeedModule.cs | 2 +- src/Radarr.Api.V3/History/HistoryModule.cs | 2 +- src/Radarr.Api.V3/History/HistoryResource.cs | 4 +- src/Radarr.Api.V3/Logs/LogFileModuleBase.cs | 4 +- .../ManualImport/ManualImportModule.cs | 2 +- .../Movies/AlternativeTitleResource.cs | 2 +- .../Movies/AlternativeYearResource.cs | 2 +- src/Radarr.Api.V3/Movies/MovieModule.cs | 10 +-- src/Radarr.Api.V3/Movies/MovieResource.cs | 14 ++--- .../NetImport/ImportExclusionsModule.cs | 2 +- src/Radarr.Api.V3/ProviderResource.cs | 2 +- src/Radarr.Api.V3/Queue/QueueModule.cs | 2 +- .../Authentication/AuthenticationService.cs | 2 +- .../ErrorManagement/RadarrErrorPipeline.cs | 2 +- .../Frontend/Mappers/StaticResourceMapper.cs | 2 +- .../RadarrRestModuleWithSignalR.cs | 2 +- 273 files changed, 566 insertions(+), 555 deletions(-) diff --git a/src/Common/CommonAssemblyInfo.cs b/src/Common/CommonAssemblyInfo.cs index c4bc6b33c..de4071d6b 100644 --- a/src/Common/CommonAssemblyInfo.cs +++ b/src/Common/CommonAssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Reflection; using System.Resources; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyCompany("Microsoft Open Technologies, Inc.")] diff --git a/src/Common/GlobalSuppressions.cs b/src/Common/GlobalSuppressions.cs index ec9dfe318..652f9324c 100644 --- a/src/Common/GlobalSuppressions.cs +++ b/src/Common/GlobalSuppressions.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. -// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. // -// To add a suppression to this file, right-click the message in the -// Code Analysis results, point to "Suppress Message", and click +// To add a suppression to this file, right-click the message in the +// Code Analysis results, point to "Suppress Message", and click // "In Suppression File". // You do not need to add suppressions to this file manually. diff --git a/src/Directory.Build.props b/src/Directory.Build.props index c678268bd..9ae001f81 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,8 @@ - true + $(SolutionDir)Stylecop.ruleset + AnyCPU true @@ -92,6 +93,16 @@ + + + + + all + runtime; build; native; contentfiles; analyzers + + + + diff --git a/src/Marr.Data/DataHelper.cs b/src/Marr.Data/DataHelper.cs index 3c6e450f5..20b5bcfe6 100644 --- a/src/Marr.Data/DataHelper.cs +++ b/src/Marr.Data/DataHelper.cs @@ -27,14 +27,14 @@ namespace Marr.Data /// internal static class DataHelper { - public static bool HasColumn(this IDataReader dr, string columnName) - { - for (int i=0; i < dr.FieldCount; i++) - { - if (dr.GetName(i).Equals(columnName, StringComparison.InvariantCultureIgnoreCase)) - return true; - } - return false; + public static bool HasColumn(this IDataReader dr, string columnName) + { + for (int i=0; i < dr.FieldCount; i++) + { + if (dr.GetName(i).Equals(columnName, StringComparison.InvariantCultureIgnoreCase)) + return true; + } + return false; } public static string ParameterPrefix(this IDbCommand command) @@ -42,7 +42,7 @@ namespace Marr.Data string commandType = command.GetType().Name.ToLower(); return commandType.Contains("oracle") ? ":" : "@"; } - + /// /// Returns the mapped name, or the member name. /// diff --git a/src/Marr.Data/DataMapper.cs b/src/Marr.Data/DataMapper.cs index a68d050e3..9cd5507af 100644 --- a/src/Marr.Data/DataMapper.cs +++ b/src/Marr.Data/DataMapper.cs @@ -131,8 +131,8 @@ namespace Marr.Data #region - SP / SQL Mode - /// - /// Gets or sets a value that determines whether the DataMapper will - /// use a stored procedure or a sql text command to access + /// Gets or sets a value that determines whether the DataMapper will + /// use a stored procedure or a sql text command to access /// the database. The default is stored procedure. /// public SqlModes SqlMode { get; set; } @@ -617,7 +617,7 @@ namespace Marr.Data { while (reader.Read()) { - // The entire EntityGraph is traversed for each record, + // The entire EntityGraph is traversed for each record, // and multiple entities are created from each view record. foreach (EntityGraph lvl in graph) { diff --git a/src/Marr.Data/EntityGraph.cs b/src/Marr.Data/EntityGraph.cs index 72d28dcdf..c97adfbd1 100644 --- a/src/Marr.Data/EntityGraph.cs +++ b/src/Marr.Data/EntityGraph.cs @@ -238,14 +238,14 @@ namespace Marr.Data } /// - /// Gets the GroupingKeys for this entity. + /// Gets the GroupingKeys for this entity. /// GroupingKeys determine when to create and add a new entity to the graph. /// /// /// A simple entity with no relationships will return only its PrimaryKey columns. /// A parent entity with one-to-one child relationships will include its own PrimaryKeys, /// and it will recursively traverse all Children with one-to-one relationships and add their PrimaryKeys. - /// A child entity that has a one-to-one relationship with its parent will use the same + /// A child entity that has a one-to-one relationship with its parent will use the same /// GroupingKeys already defined by its parent. /// public GroupingKeyCollection GroupingKeyColumns diff --git a/src/Marr.Data/IDataMapper.cs b/src/Marr.Data/IDataMapper.cs index 6d1eca49e..f0bef09a9 100644 --- a/src/Marr.Data/IDataMapper.cs +++ b/src/Marr.Data/IDataMapper.cs @@ -32,11 +32,11 @@ namespace Marr.Data DbCommand Command { get; } /// - /// Gets or sets a value that determines whether the DataMapper will - /// use a stored procedure or a sql text command to access + /// Gets or sets a value that determines whether the DataMapper will + /// use a stored procedure or a sql text command to access /// the database. The default is stored procedure. /// - SqlModes SqlMode { get; set; } + SqlModes SqlMode { get; set; } #endregion diff --git a/src/Marr.Data/MapRepository.cs b/src/Marr.Data/MapRepository.cs index cc6942115..0c60aeafa 100644 --- a/src/Marr.Data/MapRepository.cs +++ b/src/Marr.Data/MapRepository.cs @@ -181,10 +181,10 @@ namespace Marr.Data /// /// Gets or sets the reflection strategy that the DataMapper will use to load entities. - /// By default the CachedReflector will be used, which provides a performance increase over the SimpleReflector. + /// By default the CachedReflector will be used, which provides a performance increase over the SimpleReflector. /// However, the SimpleReflector can be used in Medium Trust enviroments. /// - /// + /// public IReflectionStrategy ReflectionStrategy { get; set; } #endregion @@ -236,7 +236,7 @@ namespace Marr.Data /// /// Gets or sets the IDBTypeBuilder that is responsible for converting parameter DbTypes based on the parameter value. - /// Defaults to use the DbTypeBuilder. + /// Defaults to use the DbTypeBuilder. /// You can replace this with a more specific builder if you want more control over the way the parameter types are set. /// public IDbTypeBuilder DbTypeBuilder diff --git a/src/Marr.Data/Mapping/ColumnMapBuilder.cs b/src/Marr.Data/Mapping/ColumnMapBuilder.cs index 9a7b5531d..9d0954256 100644 --- a/src/Marr.Data/Mapping/ColumnMapBuilder.cs +++ b/src/Marr.Data/Mapping/ColumnMapBuilder.cs @@ -198,7 +198,7 @@ namespace Marr.Data.Mapping } /// - /// Tries to add a ColumnMap for the given field name. + /// Tries to add a ColumnMap for the given field name. /// Throws and exception if field cannot be found. /// private void TryAddColumnMapForField(string fieldName) diff --git a/src/Marr.Data/Mapping/ColumnMapCollection.cs b/src/Marr.Data/Mapping/ColumnMapCollection.cs index 4c1b57595..06c1057d0 100644 --- a/src/Marr.Data/Mapping/ColumnMapCollection.cs +++ b/src/Marr.Data/Mapping/ColumnMapCollection.cs @@ -99,7 +99,7 @@ namespace Marr.Data.Mapping } /// - /// Parses and orders the parameters from the query text. + /// Parses and orders the parameters from the query text. /// Filters the list of mapped columns to match the parameters found in the sql query. /// All parameters starting with the '@' or ':' symbol are matched and returned. /// @@ -139,7 +139,7 @@ namespace Marr.Data.Mapping /// /// Set's each column's altname as the given prefix + the column name. - /// Ex: + /// Ex: /// Original column name: "ID" /// Passed in prefix: "PRODUCT_" /// Generated AltName: "PRODUCT_ID" @@ -154,7 +154,7 @@ namespace Marr.Data.Mapping /// /// Set's each column's altname as the column name + the given prefix. - /// Ex: + /// Ex: /// Original column name: "ID" /// Passed in suffix: "_PRODUCT" /// Generated AltName: "ID_PRODUCT" diff --git a/src/Marr.Data/Mapping/FluentMappings.cs b/src/Marr.Data/Mapping/FluentMappings.cs index b05680197..7aa2720bb 100644 --- a/src/Marr.Data/Mapping/FluentMappings.cs +++ b/src/Marr.Data/Mapping/FluentMappings.cs @@ -19,7 +19,7 @@ namespace Marr.Data.Mapping public FluentMappings(bool publicOnly) { _publicOnly = publicOnly; - + } public MappingsFluentEntity Entity() @@ -77,7 +77,7 @@ namespace Marr.Data.Mapping /// /// Creates column mappings for the given type. - /// Maps all properties that are simple types (int, string, DateTime, etc). + /// Maps all properties that are simple types (int, string, DateTime, etc). /// ICollection properties are not included. /// /// The type that is being built. diff --git a/src/Marr.Data/Mapping/IColumnInfo.cs b/src/Marr.Data/Mapping/IColumnInfo.cs index 6cf28833b..c8058743b 100644 --- a/src/Marr.Data/Mapping/IColumnInfo.cs +++ b/src/Marr.Data/Mapping/IColumnInfo.cs @@ -28,5 +28,5 @@ namespace Marr.Data.Mapping ParameterDirection ParamDirection { get; set; } string TryGetAltName(); } - + } diff --git a/src/Marr.Data/Mapping/MapBuilder.cs b/src/Marr.Data/Mapping/MapBuilder.cs index bb3a0023f..5ee201896 100644 --- a/src/Marr.Data/Mapping/MapBuilder.cs +++ b/src/Marr.Data/Mapping/MapBuilder.cs @@ -36,7 +36,7 @@ namespace Marr.Data.Mapping /// /// Creates column mappings for the given type. - /// Maps all properties that are simple types (int, string, DateTime, etc). + /// Maps all properties that are simple types (int, string, DateTime, etc). /// ICollection properties are not included. /// /// The type that is being built. @@ -49,7 +49,7 @@ namespace Marr.Data.Mapping } /// - /// Creates column mappings for the given type. + /// Creates column mappings for the given type. /// Maps properties that are included in the include list. /// /// The type that is being built. @@ -71,7 +71,7 @@ namespace Marr.Data.Mapping /// public ColumnMapBuilder BuildColumnsExcept(params string[] propertiesToExclude) { - return BuildColumns(m => + return BuildColumns(m => m.MemberType == MemberTypes.Property && !propertiesToExclude.Contains(m.Name)); } @@ -105,7 +105,7 @@ namespace Marr.Data.Mapping MapRepository.Instance.Columns[entityType] = columns; return new ColumnMapBuilder(null, columns); } - + #endregion #region - Relationships - @@ -118,8 +118,8 @@ namespace Marr.Data.Mapping /// public RelationshipBuilder BuildRelationships() { - return BuildRelationships(m => - m.MemberType == MemberTypes.Property && + return BuildRelationships(m => + m.MemberType == MemberTypes.Property && typeof(ICollection).IsAssignableFrom((m as PropertyInfo).PropertyType)); } @@ -132,10 +132,10 @@ namespace Marr.Data.Mapping /// public RelationshipBuilder BuildRelationships(params string[] propertiesToInclude) { - Func predicate = m => + Func predicate = m => ( // ICollection properties - m.MemberType == MemberTypes.Property && + m.MemberType == MemberTypes.Property && typeof(ICollection).IsAssignableFrom((m as PropertyInfo).PropertyType) && propertiesToInclude.Contains(m.Name) ) || ( // Single entity properties @@ -143,7 +143,7 @@ namespace Marr.Data.Mapping !typeof(ICollection).IsAssignableFrom((m as PropertyInfo).PropertyType) && propertiesToInclude.Contains(m.Name) ); - + return BuildRelationships(predicate); } @@ -176,7 +176,7 @@ namespace Marr.Data.Mapping MapRepository.Instance.Relationships[entityType] = relationships; return new RelationshipBuilder(null, relationships); } - + #endregion #region - Tables - diff --git a/src/Marr.Data/Mapping/RelationshipBuilder.cs b/src/Marr.Data/Mapping/RelationshipBuilder.cs index b4926633f..1770252cc 100644 --- a/src/Marr.Data/Mapping/RelationshipBuilder.cs +++ b/src/Marr.Data/Mapping/RelationshipBuilder.cs @@ -135,7 +135,7 @@ namespace Marr.Data.Mapping } /// - /// Tries to add a Relationship for the given field name. + /// Tries to add a Relationship for the given field name. /// Throws and exception if field cannot be found. /// private void TryAddRelationshipForField(string fieldName) diff --git a/src/Marr.Data/Mapping/Strategies/ConventionMapStrategy.cs b/src/Marr.Data/Mapping/Strategies/ConventionMapStrategy.cs index 6230d7fc8..20f614ceb 100644 --- a/src/Marr.Data/Mapping/Strategies/ConventionMapStrategy.cs +++ b/src/Marr.Data/Mapping/Strategies/ConventionMapStrategy.cs @@ -23,9 +23,9 @@ namespace Marr.Data.Mapping.Strategies } public Func ColumnPredicate; - public Func RelationshipPredicate; + public Func RelationshipPredicate; + - protected override void CreateColumnMap(Type entityType, MemberInfo member, ColumnAttribute columnAtt, ColumnMapCollection columnMaps) { diff --git a/src/Marr.Data/Mapping/Strategies/PropertyMapStrategy.cs b/src/Marr.Data/Mapping/Strategies/PropertyMapStrategy.cs index f9c41afd2..8a48dfc84 100644 --- a/src/Marr.Data/Mapping/Strategies/PropertyMapStrategy.cs +++ b/src/Marr.Data/Mapping/Strategies/PropertyMapStrategy.cs @@ -20,7 +20,7 @@ using System.Reflection; namespace Marr.Data.Mapping.Strategies { /// - /// Maps all public properties to DB columns. + /// Maps all public properties to DB columns. /// public class PropertyMapStrategy : AttributeMapStrategy { diff --git a/src/Marr.Data/Mapping/Strategies/ReflectionMapStrategyBase.cs b/src/Marr.Data/Mapping/Strategies/ReflectionMapStrategyBase.cs index 429cfec87..69841ae10 100644 --- a/src/Marr.Data/Mapping/Strategies/ReflectionMapStrategyBase.cs +++ b/src/Marr.Data/Mapping/Strategies/ReflectionMapStrategyBase.cs @@ -87,7 +87,7 @@ namespace Marr.Data.Mapping.Strategies ColumnAttribute columnAtt = GetColumnAttribute(member); CreateColumnMap(entityType, member, columnAtt, columnMaps); } - + return columnMaps; } @@ -124,7 +124,7 @@ namespace Marr.Data.Mapping.Strategies return null; } - + /// /// Inspect a member and optionally add a ColumnMap. /// diff --git a/src/Marr.Data/Parameters/IDbTypeBuilder.cs b/src/Marr.Data/Parameters/IDbTypeBuilder.cs index 1b04f2470..e0035ff24 100644 --- a/src/Marr.Data/Parameters/IDbTypeBuilder.cs +++ b/src/Marr.Data/Parameters/IDbTypeBuilder.cs @@ -19,7 +19,7 @@ using System.Data; namespace Marr.Data.Parameters { /// - /// Converts from a .NET datatype to the appropriate DB type enum, + /// Converts from a .NET datatype to the appropriate DB type enum, /// and then adds the value to the appropriate property on the parameter. /// public interface IDbTypeBuilder diff --git a/src/Marr.Data/Parameters/ParameterChainMethods.cs b/src/Marr.Data/Parameters/ParameterChainMethods.cs index 13148320f..bfbdd1d8e 100644 --- a/src/Marr.Data/Parameters/ParameterChainMethods.cs +++ b/src/Marr.Data/Parameters/ParameterChainMethods.cs @@ -37,7 +37,7 @@ namespace Marr.Data.Parameters Parameter.ParameterName = parameterName; // Convert null to DBNull.Value - if (value == null) + if (value == null) value = DBNull.Value; Type valueType = value.GetType(); @@ -59,9 +59,9 @@ namespace Marr.Data.Parameters else { Parameter.Value = value; - } + } } - + //// Determine the correct DbType based on the passed in value type //IDbTypeBuilder typeBuilder = MapRepository.Instance.DbTypeBuilder; @@ -122,7 +122,7 @@ namespace Marr.Data.Parameters Parameter.Scale = scale; return this; } - + public ParameterChainMethods Name(string name) { Parameter.ParameterName = name; diff --git a/src/Marr.Data/QGen/DeleteQuery.cs b/src/Marr.Data/QGen/DeleteQuery.cs index 7ea5a72fc..043e1d121 100644 --- a/src/Marr.Data/QGen/DeleteQuery.cs +++ b/src/Marr.Data/QGen/DeleteQuery.cs @@ -21,7 +21,7 @@ namespace Marr.Data.QGen public string Generate() { return string.Format("DELETE FROM {0} {1} ", - Dialect.CreateToken(TargetTable.Name), + Dialect.CreateToken(TargetTable.Name), WhereClause); } } diff --git a/src/Marr.Data/QGen/ExpressionVisitor.cs b/src/Marr.Data/QGen/ExpressionVisitor.cs index 381688e0e..af5f4ea66 100644 --- a/src/Marr.Data/QGen/ExpressionVisitor.cs +++ b/src/Marr.Data/QGen/ExpressionVisitor.cs @@ -8,7 +8,7 @@ using System.Linq.Expressions; namespace Marr.Data.QGen { /// - /// Expression visitor + /// Expression visitor /// public class ExpressionVisitor { diff --git a/src/Marr.Data/QGen/InsertQueryBuilder.cs b/src/Marr.Data/QGen/InsertQueryBuilder.cs index 85cd0098f..c5f952f90 100644 --- a/src/Marr.Data/QGen/InsertQueryBuilder.cs +++ b/src/Marr.Data/QGen/InsertQueryBuilder.cs @@ -157,7 +157,7 @@ namespace Marr.Data.QGen _db.CloseConnection(); } - + if (_generateQuery) { // Return to previous sql mode diff --git a/src/Marr.Data/QGen/JoinBuilder.cs b/src/Marr.Data/QGen/JoinBuilder.cs index 45ea28312..548383d04 100644 --- a/src/Marr.Data/QGen/JoinBuilder.cs +++ b/src/Marr.Data/QGen/JoinBuilder.cs @@ -6,7 +6,7 @@ using System.Linq.Expressions; namespace Marr.Data.QGen { /// - /// This class overrides the WhereBuilder which utilizes the ExpressionVisitor base class, + /// This class overrides the WhereBuilder which utilizes the ExpressionVisitor base class, /// and it is responsible for translating the lambda expression into a "JOIN ON" clause. /// It populates the protected string builder, which outputs the "JOIN ON" clause when the ToString method is called. /// diff --git a/src/Marr.Data/QGen/PagingQueryDecorator.cs b/src/Marr.Data/QGen/PagingQueryDecorator.cs index 60a2ece05..03901fa00 100644 --- a/src/Marr.Data/QGen/PagingQueryDecorator.cs +++ b/src/Marr.Data/QGen/PagingQueryDecorator.cs @@ -27,7 +27,7 @@ namespace Marr.Data.QGen public string Generate() { // Decide which type of paging query to create - + if (_innerQuery.IsView || _innerQuery.IsJoin) { return ComplexPaging(); @@ -56,7 +56,7 @@ namespace Marr.Data.QGen return sql.ToString(); } - + /// /// Generates a query that pages a view or joined inner query. /// @@ -165,7 +165,7 @@ namespace Marr.Data.QGen { orderBy = orderBy.Replace(string.Format("[{0}].", t.Alias), ""); } - + sql.AppendFormat(", ROW_NUMBER() OVER ({0}) As RowNumber ", orderBy); } diff --git a/src/Marr.Data/QGen/QueryBuilder.cs b/src/Marr.Data/QGen/QueryBuilder.cs index ba135ac07..9af8632b3 100644 --- a/src/Marr.Data/QGen/QueryBuilder.cs +++ b/src/Marr.Data/QGen/QueryBuilder.cs @@ -190,7 +190,7 @@ namespace Marr.Data.QGen _isGraph = true; return this; } - + public virtual QueryBuilder Page(int pageNumber, int pageSize) { _enablePaging = true; @@ -198,7 +198,7 @@ namespace Marr.Data.QGen _take = pageSize; return this; } - + private string[] ParseChildrenToLoad(Expression>[] childrenToLoad) { List entitiesToLoad = new List(); @@ -208,7 +208,7 @@ namespace Marr.Data.QGen { MemberInfo member = (exp.Body as MemberExpression).Member; entitiesToLoad.Add(member.Name); - + } return entitiesToLoad.ToArray(); diff --git a/src/Marr.Data/QGen/QueryFactory.cs b/src/Marr.Data/QGen/QueryFactory.cs index 5e1d90b9a..f183be25a 100644 --- a/src/Marr.Data/QGen/QueryFactory.cs +++ b/src/Marr.Data/QGen/QueryFactory.cs @@ -16,7 +16,7 @@ namespace Marr.Data.QGen private const string DB_OracleDataAccessClient = "Oracle.DataAccess.Client.OracleClientFactory"; private const string DB_FireBirdClient = "FirebirdSql.Data.FirebirdClient.FirebirdClientFactory"; private const string DB_SQLiteClient = "System.Data.SQLite.SQLiteFactory"; - + public static IQuery CreateUpdateQuery(ColumnMapCollection columns, IDataMapper dataMapper, string target, string whereClause) { Dialect dialect = CreateDialect(dataMapper); diff --git a/src/Marr.Data/QGen/RowCountQueryDecorator.cs b/src/Marr.Data/QGen/RowCountQueryDecorator.cs index 2d489b3c0..683a37f7b 100644 --- a/src/Marr.Data/QGen/RowCountQueryDecorator.cs +++ b/src/Marr.Data/QGen/RowCountQueryDecorator.cs @@ -10,7 +10,7 @@ namespace Marr.Data.QGen { _innerQuery = innerQuery; } - + public string Generate() { // Decide which type of paging query to create @@ -108,12 +108,12 @@ namespace Marr.Data.QGen } /* -WITH GroupCTE AS +WITH GroupCTE AS ( - SELECT [t0].[ID],[t0].[OrderName],[t1].[ID] AS OrderItemID,[t1].[OrderID],[t1].[ItemDescription],[t1].[Price], - ROW_NUMBER() OVER (PARTITION BY [t0].[ID] ORDER BY [t0].[OrderName]) As GroupRow - FROM [Order] [t0] - LEFT JOIN [OrderItem] [t1] ON (([t0].[ID] = [t1].[OrderID])) + SELECT [t0].[ID],[t0].[OrderName],[t1].[ID] AS OrderItemID,[t1].[OrderID],[t1].[ItemDescription],[t1].[Price], + ROW_NUMBER() OVER (PARTITION BY [t0].[ID] ORDER BY [t0].[OrderName]) As GroupRow + FROM [Order] [t0] + LEFT JOIN [OrderItem] [t1] ON (([t0].[ID] = [t1].[OrderID])) --WHERE (([t0].[OrderName] = @P0)) ) SELECT * FROM GroupCTE diff --git a/src/Marr.Data/QGen/SelectQuery.cs b/src/Marr.Data/QGen/SelectQuery.cs index 97aa15f10..6b4fb865e 100644 --- a/src/Marr.Data/QGen/SelectQuery.cs +++ b/src/Marr.Data/QGen/SelectQuery.cs @@ -131,7 +131,7 @@ namespace Marr.Data.QGen { sql.Append(OrderBy.ToString()); } - + public void BuildGroupBy(StringBuilder sql) { var baseTable = this.Tables.First(); diff --git a/src/Marr.Data/QGen/SortBuilder.cs b/src/Marr.Data/QGen/SortBuilder.cs index 32c85eccd..ce6e23928 100644 --- a/src/Marr.Data/QGen/SortBuilder.cs +++ b/src/Marr.Data/QGen/SortBuilder.cs @@ -85,7 +85,7 @@ namespace Marr.Data.QGen _sortExpressions.Add(new SortColumn(declaringType, propertyName, SortDirection.Desc)); return this; } - + public virtual SortBuilder OrderBy(string orderByClause) { if (string.IsNullOrEmpty(orderByClause)) diff --git a/src/Marr.Data/QGen/SortColumn.cs b/src/Marr.Data/QGen/SortColumn.cs index 6d9236219..025cf13c2 100644 --- a/src/Marr.Data/QGen/SortColumn.cs +++ b/src/Marr.Data/QGen/SortColumn.cs @@ -37,7 +37,7 @@ namespace Marr.Data.QGen return me; } } - + public enum SortDirection { Asc, diff --git a/src/Marr.Data/QGen/SqliteRowCountQueryDecorator.cs b/src/Marr.Data/QGen/SqliteRowCountQueryDecorator.cs index b518defb2..ac1bdde81 100644 --- a/src/Marr.Data/QGen/SqliteRowCountQueryDecorator.cs +++ b/src/Marr.Data/QGen/SqliteRowCountQueryDecorator.cs @@ -10,11 +10,11 @@ namespace Marr.Data.QGen { _innerQuery = innerQuery; } - + public string Generate() { StringBuilder sql = new StringBuilder(); - + BuildSelectCountClause(sql); if (_innerQuery.IsJoin) @@ -29,7 +29,7 @@ namespace Marr.Data.QGen return sql.ToString(); } - + _innerQuery.BuildFromClause(sql); _innerQuery.BuildJoinClauses(sql); _innerQuery.BuildWhereClause(sql); diff --git a/src/Marr.Data/QGen/UpdateQueryBuilder.cs b/src/Marr.Data/QGen/UpdateQueryBuilder.cs index 6e12d76ae..0feb56f91 100644 --- a/src/Marr.Data/QGen/UpdateQueryBuilder.cs +++ b/src/Marr.Data/QGen/UpdateQueryBuilder.cs @@ -155,7 +155,7 @@ namespace Marr.Data.QGen { _db.OpenConnection(); rowsAffected = _db.Command.ExecuteNonQuery(); - _mappingHelper.SetOutputValues(_entity, _mappings.OutputFields); + _mappingHelper.SetOutputValues(_entity, _mappings.OutputFields); } finally { diff --git a/src/Marr.Data/QGen/View.cs b/src/Marr.Data/QGen/View.cs index f750c2e06..5808bcf81 100644 --- a/src/Marr.Data/QGen/View.cs +++ b/src/Marr.Data/QGen/View.cs @@ -25,7 +25,7 @@ namespace Marr.Data.QGen { get { return _tables; } } - + public override string Name { get diff --git a/src/Marr.Data/QGen/WhereBuilder.cs b/src/Marr.Data/QGen/WhereBuilder.cs index 0b5d9c49e..b2573a26d 100644 --- a/src/Marr.Data/QGen/WhereBuilder.cs +++ b/src/Marr.Data/QGen/WhereBuilder.cs @@ -49,7 +49,7 @@ namespace Marr.Data.QGen { _sb.AppendFormat("{0} ", PrefixText); base.Visit(filter); - } + } } protected virtual string PrefixText @@ -93,7 +93,7 @@ namespace Marr.Data.QGen case "EndsWith": Write_EndsWith(expression); break; - + case "In": Write_In(expression); break; @@ -148,14 +148,14 @@ namespace Marr.Data.QGen private object GetRightValue(Expression expression) { object rightValue = null; - + var simpleConstExp = expression as ConstantExpression; if (simpleConstExp == null) // Value is not directly passed in as a constant { MemberExpression memberExp = expression as MemberExpression; ConstantExpression constExp = null; - // Value may be nested in multiple levels of objects/properties, so traverse the MemberExpressions + // Value may be nested in multiple levels of objects/properties, so traverse the MemberExpressions // until a ConstantExpression property value is found, and then unwind the stack to get the value. var memberNames = new Stack(); @@ -218,8 +218,8 @@ namespace Marr.Data.QGen private string Decode(BinaryExpression expression) { - bool isRightSideNullConstant = expression.Right.NodeType == - ExpressionType.Constant && + bool isRightSideNullConstant = expression.Right.NodeType == + ExpressionType.Constant && ((ConstantExpression)expression.Right).Value == null; if (isRightSideNullConstant) @@ -315,7 +315,7 @@ namespace Marr.Data.QGen } return _constantWhereClause; } - } + } internal enum WhereAppendType { diff --git a/src/Marr.Data/Reflection/ReflectionHelper.cs b/src/Marr.Data/Reflection/ReflectionHelper.cs index c8ca97308..6b4a3f2f4 100644 --- a/src/Marr.Data/Reflection/ReflectionHelper.cs +++ b/src/Marr.Data/Reflection/ReflectionHelper.cs @@ -40,7 +40,7 @@ namespace Marr.Data.Reflection } /// - /// Gets the CLR data type of a MemberInfo. + /// Gets the CLR data type of a MemberInfo. /// If the type is nullable, returns the underlying type. /// /// diff --git a/src/Marr.Data/UnitOfWork.cs b/src/Marr.Data/UnitOfWork.cs index 7e071c77c..db2958ffa 100644 --- a/src/Marr.Data/UnitOfWork.cs +++ b/src/Marr.Data/UnitOfWork.cs @@ -7,7 +7,7 @@ namespace Marr.Data /// /// The UnitOfWork class can be used to manage the lifetime of an IDataMapper, from creation to disposal. /// When used in a "using" statement, the UnitOfWork will create and dispose an IDataMapper. - /// When the SharedContext property is used in a "using" statement, + /// When the SharedContext property is used in a "using" statement, /// it will create a parent unit of work that will share a single IDataMapper with other units of work, /// and the IDataMapper will not be disposed until the shared context is disposed. /// If more than one shared context is created, the IDataMapper will be disposed when the outer most diff --git a/src/Marr.Data/UnitOfWorkSharedContext.cs b/src/Marr.Data/UnitOfWorkSharedContext.cs index 9d92f1b6e..bb7c24c32 100644 --- a/src/Marr.Data/UnitOfWorkSharedContext.cs +++ b/src/Marr.Data/UnitOfWorkSharedContext.cs @@ -3,7 +3,7 @@ namespace Marr.Data { /// - /// Works in conjunction with the UnitOfWork to create a new + /// Works in conjunction with the UnitOfWork to create a new /// shared context that will preserve a single IDataMapper. /// public class UnitOfWorkSharedContext : IDisposable diff --git a/src/MonoTorrent/BEncoding/BEncodedDictionary.cs b/src/MonoTorrent/BEncoding/BEncodedDictionary.cs index 861c0a2aa..bcdd6c4fa 100644 --- a/src/MonoTorrent/BEncoding/BEncodedDictionary.cs +++ b/src/MonoTorrent/BEncoding/BEncodedDictionary.cs @@ -59,7 +59,7 @@ namespace MonoTorrent.BEncoding /// - /// + /// /// /// internal override void DecodeInternal(RawReader reader) @@ -133,7 +133,7 @@ namespace MonoTorrent.BEncoding } else value = BEncodedValue.Decode(reader); // the value is a BEncoded value - + torrent.dictionary.Add(key, value); } diff --git a/src/MonoTorrent/BEncoding/BEncodedList.cs b/src/MonoTorrent/BEncoding/BEncodedList.cs index 706146407..2b1a3359a 100644 --- a/src/MonoTorrent/BEncoding/BEncodedList.cs +++ b/src/MonoTorrent/BEncoding/BEncodedList.cs @@ -38,7 +38,7 @@ namespace MonoTorrent.BEncoding { if (list == null) throw new ArgumentNullException("list"); - + this.list = new List(list); } diff --git a/src/MonoTorrent/BEncoding/BEncodedNumber.cs b/src/MonoTorrent/BEncoding/BEncodedNumber.cs index ef634007c..087be5aa0 100644 --- a/src/MonoTorrent/BEncoding/BEncodedNumber.cs +++ b/src/MonoTorrent/BEncoding/BEncodedNumber.cs @@ -56,7 +56,7 @@ namespace MonoTorrent.BEncoding int written = offset; buffer[written++] = (byte)'i'; - + if (number < 0) { buffer[written++] = (byte)'-'; @@ -171,7 +171,7 @@ namespace MonoTorrent.BEncoding #region Overridden Methods /// - /// + /// /// /// /// @@ -185,7 +185,7 @@ namespace MonoTorrent.BEncoding } /// - /// + /// /// /// public override int GetHashCode() @@ -194,7 +194,7 @@ namespace MonoTorrent.BEncoding } /// - /// + /// /// /// public override string ToString() diff --git a/src/MonoTorrent/BEncoding/IBEncodedValue.cs b/src/MonoTorrent/BEncoding/IBEncodedValue.cs index 8d168c5a0..21dfdf86a 100644 --- a/src/MonoTorrent/BEncoding/IBEncodedValue.cs +++ b/src/MonoTorrent/BEncoding/IBEncodedValue.cs @@ -87,7 +87,7 @@ namespace MonoTorrent.BEncoding /// - /// Decode BEncoded data in the given stream + /// Decode BEncoded data in the given stream /// /// The stream containing the BEncoded data /// BEncodedValue containing the data that was in the stream @@ -177,7 +177,7 @@ namespace MonoTorrent.BEncoding /// - /// Decode BEncoded data in the given stream + /// Decode BEncoded data in the given stream /// /// The stream containing the BEncoded data /// BEncodedValue containing the data that was in the stream diff --git a/src/MonoTorrent/Hashes.cs b/src/MonoTorrent/Hashes.cs index f674f9e63..3b84ec6ba 100644 --- a/src/MonoTorrent/Hashes.cs +++ b/src/MonoTorrent/Hashes.cs @@ -61,7 +61,7 @@ namespace MonoTorrent throw new ArgumentException(string.Format("Hash must be {0} bytes in length", HashCodeLength), "hash"); if (hashIndex < 0 || hashIndex > this.count) - throw new ArgumentOutOfRangeException("hashIndex", string.Format("hashIndex must be between 0 and {0}", this.count)); + throw new ArgumentOutOfRangeException("hashIndex", string.Format("hashIndex must be between 0 and {0}", this.count)); int start = hashIndex * HashCodeLength; for (int i = 0; i < HashCodeLength; i++) diff --git a/src/MonoTorrent/InfoHash.cs b/src/MonoTorrent/InfoHash.cs index a604c11c9..e87101909 100644 --- a/src/MonoTorrent/InfoHash.cs +++ b/src/MonoTorrent/InfoHash.cs @@ -100,7 +100,7 @@ namespace MonoTorrent Check.InfoHash (infoHash); if (infoHash.Length != 32) throw new ArgumentException("Infohash must be a base32 encoded 32 character string"); - + infoHash = infoHash.ToLower(); int infohashOffset =0 ; byte[] hash = new byte[20]; @@ -126,7 +126,7 @@ namespace MonoTorrent Check.InfoHash (infoHash); if (infoHash.Length != 40) throw new ArgumentException("Infohash must be 40 characters long"); - + byte[] hash = new byte[20]; for (int i = 0; i < hash.Length; i++) hash[i] = byte.Parse(infoHash.Substring(i * 2, 2), System.Globalization.NumberStyles.HexNumber); diff --git a/src/MonoTorrent/ToolBox.cs b/src/MonoTorrent/ToolBox.cs index a22c1a5a2..390f1e5bf 100644 --- a/src/MonoTorrent/ToolBox.cs +++ b/src/MonoTorrent/ToolBox.cs @@ -26,7 +26,7 @@ namespace MonoTorrent foreach (T t in enumerable) count += action(t); - + return count; } diff --git a/src/MonoTorrent/Torrent.cs b/src/MonoTorrent/Torrent.cs index 1ccfc19ae..481051cfb 100644 --- a/src/MonoTorrent/Torrent.cs +++ b/src/MonoTorrent/Torrent.cs @@ -60,8 +60,8 @@ namespace MonoTorrent /// - /// This dictionary is specific for azureus client - /// It can contain + /// This dictionary is specific for azureus client + /// It can contain /// dht_backup_enable (number) /// Content (dictionnary) /// Publisher @@ -651,7 +651,7 @@ namespace MonoTorrent public static bool TryLoad(Stream stream, out Torrent torrent) { Check.Stream(stream); - + try { torrent = Torrent.Load(stream); @@ -676,7 +676,7 @@ namespace MonoTorrent { Check.Url(url); Check.Location(location); - + try { torrent = Torrent.Load(url, location); diff --git a/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs b/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs index e9b65a2be..5342fdaee 100644 --- a/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs +++ b/src/NzbDrone.Api/Calendar/CalendarFeedModule.cs @@ -114,11 +114,11 @@ namespace NzbDrone.Api.Calendar { return; } - + var occurrence = calendar.Create(); occurrence.Uid = "NzbDrone_movie_" + movie.Id + (cinemasRelease ? "_cinemas" : "_physical"); occurrence.Status = movie.Status == MovieStatusType.Announced ? EventStatus.Tentative : EventStatus.Confirmed; - + occurrence.Start = new CalDateTime(date.Value); occurrence.End = occurrence.Start; occurrence.IsAllDay = true; diff --git a/src/NzbDrone.Api/Config/UiConfigResource.cs b/src/NzbDrone.Api/Config/UiConfigResource.cs index 988b976b6..d6b1b7dc3 100644 --- a/src/NzbDrone.Api/Config/UiConfigResource.cs +++ b/src/NzbDrone.Api/Config/UiConfigResource.cs @@ -26,7 +26,7 @@ namespace NzbDrone.Api.Config { FirstDayOfWeek = model.FirstDayOfWeek, CalendarWeekColumnHeader = model.CalendarWeekColumnHeader, - + ShortDateFormat = model.ShortDateFormat, LongDateFormat = model.LongDateFormat, TimeFormat = model.TimeFormat, diff --git a/src/NzbDrone.Api/Indexers/IndexerModule.cs b/src/NzbDrone.Api/Indexers/IndexerModule.cs index 02daa7708..53166381e 100644 --- a/src/NzbDrone.Api/Indexers/IndexerModule.cs +++ b/src/NzbDrone.Api/Indexers/IndexerModule.cs @@ -12,7 +12,7 @@ namespace NzbDrone.Api.Indexers protected override void MapToResource(IndexerResource resource, IndexerDefinition definition) { base.MapToResource(resource, definition); - + resource.EnableRss = definition.EnableRss; resource.EnableSearch = definition.EnableAutomaticSearch || definition.EnableInteractiveSearch; resource.SupportsRss = definition.SupportsRss; diff --git a/src/NzbDrone.Api/Indexers/ReleaseModule.cs b/src/NzbDrone.Api/Indexers/ReleaseModule.cs index 55dfd874a..359e8e79c 100644 --- a/src/NzbDrone.Api/Indexers/ReleaseModule.cs +++ b/src/NzbDrone.Api/Indexers/ReleaseModule.cs @@ -23,7 +23,7 @@ namespace NzbDrone.Api.Indexers private readonly IPrioritizeDownloadDecision _prioritizeDownloadDecision; private readonly IDownloadService _downloadService; private readonly Logger _logger; - + private readonly ICached _remoteMovieCache; public ReleaseModule(IFetchAndParseRss rssFetcherAndParser, @@ -46,7 +46,7 @@ namespace NzbDrone.Api.Indexers //PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true); PostValidator.RuleFor(s => s.Guid).NotEmpty(); - + _remoteMovieCache = cacheManager.GetCache(GetType(), "remoteMovies"); } @@ -117,7 +117,7 @@ namespace NzbDrone.Api.Indexers { _remoteMovieCache.Set(decision.RemoteMovie.Release.Guid, decision.RemoteMovie, TimeSpan.FromMinutes(30)); - + return base.MapDecision(decision, initialWeight); } } diff --git a/src/NzbDrone.Api/Logs/LogFileModuleBase.cs b/src/NzbDrone.Api/Logs/LogFileModuleBase.cs index b43dce781..fa1de297e 100644 --- a/src/NzbDrone.Api/Logs/LogFileModuleBase.cs +++ b/src/NzbDrone.Api/Logs/LogFileModuleBase.cs @@ -39,7 +39,7 @@ namespace NzbDrone.Api.Logs { var file = files[i]; var filename = Path.GetFileName(file); - + result.Add(new LogFileResource { Id = i + 1, @@ -63,7 +63,7 @@ namespace NzbDrone.Api.Logs return new NotFoundResponse(); var data = _diskProvider.ReadAllText(filePath); - + return new TextResponse(data); } diff --git a/src/NzbDrone.Api/Movies/AlternativeTitleResource.cs b/src/NzbDrone.Api/Movies/AlternativeTitleResource.cs index aaa96f0c2..021761907 100644 --- a/src/NzbDrone.Api/Movies/AlternativeTitleResource.cs +++ b/src/NzbDrone.Api/Movies/AlternativeTitleResource.cs @@ -10,7 +10,7 @@ namespace NzbDrone.Api.Movies { public AlternativeTitleResource() { - + } //Todo: Sorters should be done completely on the client diff --git a/src/NzbDrone.Api/Movies/AlternativeYearResource.cs b/src/NzbDrone.Api/Movies/AlternativeYearResource.cs index 1085d2166..d7ee8bd9b 100644 --- a/src/NzbDrone.Api/Movies/AlternativeYearResource.cs +++ b/src/NzbDrone.Api/Movies/AlternativeYearResource.cs @@ -6,7 +6,7 @@ namespace NzbDrone.Api.Movies { public AlternativeYearResource() { - + } //Todo: Sorters should be done completely on the client diff --git a/src/NzbDrone.Api/Movies/MovieResource.cs b/src/NzbDrone.Api/Movies/MovieResource.cs index 8baf81f7f..3afb1d302 100644 --- a/src/NzbDrone.Api/Movies/MovieResource.cs +++ b/src/NzbDrone.Api/Movies/MovieResource.cs @@ -18,7 +18,7 @@ namespace NzbDrone.Api.Movies //Todo: Sorters should be done completely on the client //Todo: Is there an easy way to keep IgnoreArticlesWhenSorting in sync between, Series, History, Missing? //Todo: We should get the entire Profile instead of ID and Name separately - + //View Only public string Title { get; set; } public List AlternativeTitles { get; set; } @@ -96,9 +96,9 @@ namespace NzbDrone.Api.Movies long size = model.MovieFile?.Size ?? 0; bool downloaded = model.MovieFile != null; MovieFileResource movieFile = model.MovieFile?.ToResource(); - - + + /*if(model.MovieFile != null) { model.MovieFile.LazyLoad(); @@ -110,7 +110,7 @@ namespace NzbDrone.Api.Movies downloaded = true; movieFile = model.MovieFile.Value.ToResource(); }*/ - + //model.AlternativeTitles.LazyLoad(); return new MovieResource @@ -134,18 +134,18 @@ namespace NzbDrone.Api.Movies //NextAiring //PreviousAiring Images = model.Images, - + Year = model.Year, SecondaryYear = model.SecondaryYear, SecondaryYearSourceId = model.SecondaryYearSourceId, - + Path = model.Path, ProfileId = model.ProfileId, PathState = model.PathState, - + Monitored = model.Monitored, MinimumAvailability = model.MinimumAvailability, - + IsAvailable = model.IsAvailable(), FolderName = model.FolderName(), @@ -205,7 +205,7 @@ namespace NzbDrone.Api.Movies Monitored = resource.Monitored, MinimumAvailability = resource.MinimumAvailability, - + Runtime = resource.Runtime, LastInfoSync = resource.LastInfoSync, CleanTitle = resource.CleanTitle, diff --git a/src/NzbDrone.Api/NetImport/ImportExclusionsModule.cs b/src/NzbDrone.Api/NetImport/ImportExclusionsModule.cs index dfa9294f8..eca4696a2 100644 --- a/src/NzbDrone.Api/NetImport/ImportExclusionsModule.cs +++ b/src/NzbDrone.Api/NetImport/ImportExclusionsModule.cs @@ -27,7 +27,7 @@ namespace NzbDrone.Api.NetImport { return _exclusionService.GetById(id).ToResource(); } - + public int AddExclusion(ImportExclusionsResource exclusionResource) { var model = exclusionResource.ToModel(); diff --git a/src/NzbDrone.Api/Notifications/NotificationModule.cs b/src/NzbDrone.Api/Notifications/NotificationModule.cs index b7aad3a61..6403f02f4 100644 --- a/src/NzbDrone.Api/Notifications/NotificationModule.cs +++ b/src/NzbDrone.Api/Notifications/NotificationModule.cs @@ -12,7 +12,7 @@ namespace NzbDrone.Api.Notifications protected override void MapToResource(NotificationResource resource, NotificationDefinition definition) { base.MapToResource(resource, definition); - + resource.OnGrab = definition.OnGrab; resource.OnDownload = definition.OnDownload; resource.OnUpgrade = definition.OnUpgrade; diff --git a/src/NzbDrone.Api/Queue/QueueActionModule.cs b/src/NzbDrone.Api/Queue/QueueActionModule.cs index 60384a7d7..ed306dc6b 100644 --- a/src/NzbDrone.Api/Queue/QueueActionModule.cs +++ b/src/NzbDrone.Api/Queue/QueueActionModule.cs @@ -88,7 +88,7 @@ namespace NzbDrone.Api.Queue { var resource = Request.Body.FromJson(); var trackedDownload = GetTrackedDownload(resource.Id); - + _completedDownloadService.Process(trackedDownload, true); return resource; diff --git a/src/NzbDrone.Api/Wanted/MovieMissingModule.cs b/src/NzbDrone.Api/Wanted/MovieMissingModule.cs index 87cf09b4a..676b69da6 100644 --- a/src/NzbDrone.Api/Wanted/MovieMissingModule.cs +++ b/src/NzbDrone.Api/Wanted/MovieMissingModule.cs @@ -10,9 +10,9 @@ namespace NzbDrone.Api.Wanted { class MovieMissingModule : MovieModuleWithSignalR { - public MovieMissingModule(IMovieService movieService, - IUpgradableSpecification qualityUpgradableSpecification, - IBroadcastSignalRMessage signalRBroadcaster) + public MovieMissingModule(IMovieService movieService, + IUpgradableSpecification qualityUpgradableSpecification, + IBroadcastSignalRMessage signalRBroadcaster) : base(movieService, qualityUpgradableSpecification, signalRBroadcaster, "wanted/missing") { GetResourcePaged = GetMissingMovies; diff --git a/src/NzbDrone.Common.Test/DiskTests/DirectoryLookupServiceFixture.cs b/src/NzbDrone.Common.Test/DiskTests/DirectoryLookupServiceFixture.cs index 70b68ca0a..78aa99f7d 100644 --- a/src/NzbDrone.Common.Test/DiskTests/DirectoryLookupServiceFixture.cs +++ b/src/NzbDrone.Common.Test/DiskTests/DirectoryLookupServiceFixture.cs @@ -76,7 +76,7 @@ namespace NzbDrone.Common.Test.DiskTests .Returns(_folders); var result = Subject.LookupContents(root, false, false); - + result.Directories.Should().HaveCount(_folders.Count - 3); result.Directories.Should().NotContain(f => f.Name == RECYCLING_BIN); diff --git a/src/NzbDrone.Common.Test/DiskTests/FreeSpaceFixtureBase.cs b/src/NzbDrone.Common.Test/DiskTests/FreeSpaceFixtureBase.cs index b43e723ee..efef3e1c9 100644 --- a/src/NzbDrone.Common.Test/DiskTests/FreeSpaceFixtureBase.cs +++ b/src/NzbDrone.Common.Test/DiskTests/FreeSpaceFixtureBase.cs @@ -62,7 +62,7 @@ namespace NzbDrone.Common.Test.DiskTests { if (new DriveInfo(driveletter.ToString()).IsReady) continue; - + Assert.Throws(() => Subject.GetAvailableSpace(driveletter + @":\NOT_A_REAL_PATH\DOES_NOT_EXIST".AsOsAgnostic())); return; } diff --git a/src/NzbDrone.Common.Test/EnvironmentTests/StartupArgumentsFixture.cs b/src/NzbDrone.Common.Test/EnvironmentTests/StartupArgumentsFixture.cs index c34c0cf70..dd7f858f8 100644 --- a/src/NzbDrone.Common.Test/EnvironmentTests/StartupArgumentsFixture.cs +++ b/src/NzbDrone.Common.Test/EnvironmentTests/StartupArgumentsFixture.cs @@ -55,7 +55,7 @@ namespace NzbDrone.Common.Test.EnvironmentTests args.PreservedArguments.Should().Be(preserved); } - + [Test] public void should_preserver_both() { diff --git a/src/NzbDrone.Common/Disk/DiskProviderBase.cs b/src/NzbDrone.Common/Disk/DiskProviderBase.cs index 0cef181fc..364a25824 100644 --- a/src/NzbDrone.Common/Disk/DiskProviderBase.cs +++ b/src/NzbDrone.Common/Disk/DiskProviderBase.cs @@ -301,7 +301,7 @@ namespace NzbDrone.Common.Disk public void FileSetLastWriteTime(string path, DateTime dateTime) { Ensure.That(path, () => path).IsValidPath(); - + if (dateTime.Before(DateTimeExtensions.Epoch)) { dateTime = DateTimeExtensions.Epoch; diff --git a/src/NzbDrone.Common/Disk/OsPath.cs b/src/NzbDrone.Common/Disk/OsPath.cs index bed4c67c6..89bdb5073 100644 --- a/src/NzbDrone.Common/Disk/OsPath.cs +++ b/src/NzbDrone.Common/Disk/OsPath.cs @@ -97,7 +97,7 @@ namespace NzbDrone.Common.Disk { return _path.StartsWith("/"); } - + return false; } } @@ -112,7 +112,7 @@ namespace NzbDrone.Common.Disk { return new OsPath(null); } - + return new OsPath(_path.Substring(0, index), _kind).AsDirectory(); } } @@ -136,7 +136,7 @@ namespace NzbDrone.Common.Disk return path; } - + return _path.Substring(index).Trim('\\', '/'); } } diff --git a/src/NzbDrone.Common/EnsureThat/Resources/ExceptionMessages.Designer.cs b/src/NzbDrone.Common/EnsureThat/Resources/ExceptionMessages.Designer.cs index 5b800bb9c..a16516478 100644 --- a/src/NzbDrone.Common/EnsureThat/Resources/ExceptionMessages.Designer.cs +++ b/src/NzbDrone.Common/EnsureThat/Resources/ExceptionMessages.Designer.cs @@ -20,15 +20,15 @@ namespace NzbDrone.Common.EnsureThat.Resources { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class ExceptionMessages { - + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal ExceptionMessages() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// @@ -42,7 +42,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. @@ -56,7 +56,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { resourceCulture = value; } } - + /// /// Looks up a localized string similar to Empty collection is not allowed.. /// @@ -65,7 +65,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsEmptyCollection", resourceCulture); } } - + /// /// Looks up a localized string similar to Empty Guid is not allowed.. /// @@ -74,7 +74,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsEmptyGuid", resourceCulture); } } - + /// /// Looks up a localized string similar to Expected an expression that evaluates to false.. /// @@ -83,7 +83,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotFalse", resourceCulture); } } - + /// /// Looks up a localized string similar to value '{0}' is not greater than limit '{1}'.. /// @@ -92,7 +92,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotGt", resourceCulture); } } - + /// /// Looks up a localized string similar to value '{0}' is not greater than or equal to limit '{1}'.. /// @@ -101,7 +101,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotGte", resourceCulture); } } - + /// /// Looks up a localized string similar to value '{0}' is > max '{1}'.. /// @@ -110,7 +110,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotInRange_ToHigh", resourceCulture); } } - + /// /// Looks up a localized string similar to The string is too long. Must be between '{0}' and '{1}'. Must be between '{0}' and '{1}' but was '{2}' characters long.. /// @@ -119,7 +119,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotInRange_ToLong", resourceCulture); } } - + /// /// Looks up a localized string similar to value '{0}' is < min '{1}'.. /// @@ -128,7 +128,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotInRange_ToLow", resourceCulture); } } - + /// /// Looks up a localized string similar to The string is not long enough. Must be between '{0}' and '{1}' but was '{2}' characters long.. /// @@ -137,7 +137,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotInRange_ToShort", resourceCulture); } } - + /// /// Looks up a localized string similar to value '{0}' is not lower than limit '{1}'.. /// @@ -146,7 +146,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotLt", resourceCulture); } } - + /// /// Looks up a localized string similar to value '{0}' is not lower than or equal to limit '{1}'.. /// @@ -155,7 +155,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotLte", resourceCulture); } } - + /// /// Looks up a localized string similar to Value can not be null.. /// @@ -164,7 +164,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotNull", resourceCulture); } } - + /// /// Looks up a localized string similar to The string can't be null or empty.. /// @@ -173,7 +173,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotNullOrEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to The string can't be left empty, null or consist of only whitespaces.. /// @@ -182,7 +182,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotNullOrWhiteSpace", resourceCulture); } } - + /// /// Looks up a localized string similar to The param is not of expected type: '{0}'.. /// @@ -191,7 +191,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotOfType", resourceCulture); } } - + /// /// Looks up a localized string similar to Expected an expression that evaluates to true.. /// @@ -200,7 +200,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_IsNotTrue", resourceCulture); } } - + /// /// Looks up a localized string similar to value '{0}' does not match '{1}'. /// @@ -209,7 +209,7 @@ namespace NzbDrone.Common.EnsureThat.Resources { return ResourceManager.GetString("EnsureExtensions_NoMatch", resourceCulture); } } - + /// /// Looks up a localized string similar to No MemberExpression found in expression: '{0}'.. /// diff --git a/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs b/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs index e29f3c220..591d029ce 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs @@ -47,7 +47,7 @@ namespace NzbDrone.Common.EnvironmentInfo { throw new RadarrStartupException("Cannot create AppFolder, Access to the path {0} is denied", _appFolderInfo.AppDataFolder); } - + if (OsInfo.IsWindows) { diff --git a/src/NzbDrone.Common/Extensions/DateTimeExtensions.cs b/src/NzbDrone.Common/Extensions/DateTimeExtensions.cs index ef965e1ec..797e62bd7 100644 --- a/src/NzbDrone.Common/Extensions/DateTimeExtensions.cs +++ b/src/NzbDrone.Common/Extensions/DateTimeExtensions.cs @@ -38,7 +38,7 @@ namespace NzbDrone.Common.Extensions { return dateTime >= afterDateTime && dateTime <= beforeDateTime; } - + public static DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); } } diff --git a/src/NzbDrone.Common/Http/HttpAccept.cs b/src/NzbDrone.Common/Http/HttpAccept.cs index aaae55348..fc0eab894 100644 --- a/src/NzbDrone.Common/Http/HttpAccept.cs +++ b/src/NzbDrone.Common/Http/HttpAccept.cs @@ -10,7 +10,7 @@ public static readonly HttpAccept JsonCharset = new HttpAccept("application/json;charset=utf-8"); #endif public static readonly HttpAccept Html = new HttpAccept("text/html"); - + public string Value { get; private set; } public HttpAccept(string accept) diff --git a/src/NzbDrone.Common/Instrumentation/CleanseLogMessage.cs b/src/NzbDrone.Common/Instrumentation/CleanseLogMessage.cs index c7788f31d..9bcf18994 100644 --- a/src/NzbDrone.Common/Instrumentation/CleanseLogMessage.cs +++ b/src/NzbDrone.Common/Instrumentation/CleanseLogMessage.cs @@ -16,7 +16,7 @@ namespace NzbDrone.Common.Instrumentation new Regex(@"iptorrents\.com/[/a-z0-9?&;]*?(?:[?&;](u|tp)=(?[^&=;]+?))+(?= |;|&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), new Regex(@"/fetch/[a-z0-9]{32}/(?[a-z0-9]{32})", RegexOptions.Compiled), new Regex(@"getnzb.*?(?<=\?|&)(r)=(?[^&=]+?)(?= |&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), - + // Path new Regex(@"""C:\\Users\\(?[^\""]+?)(\\|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), new Regex(@"""/home/(?[^/""]+?)(/|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), diff --git a/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs b/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs index 15b2956c9..adacdf906 100644 --- a/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs +++ b/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs @@ -57,7 +57,7 @@ namespace NzbDrone.Common.Instrumentation.Sentry private static readonly HashSet IncludeExceptionMessageTypes = new HashSet { "SQLiteException" }; - + private static readonly IDictionary LoggingLevelMap = new Dictionary { {LogLevel.Debug, SentryLevel.Debug}, @@ -244,7 +244,7 @@ namespace NzbDrone.Common.Instrumentation.Sentry { return false; } - + if (FilteredExceptionMessages.Any(x => logEvent.Exception.Message.Contains(x))) { return false; diff --git a/src/NzbDrone.Common/OAuth/OAuthTools.cs b/src/NzbDrone.Common/OAuth/OAuthTools.cs index 04501ad02..40d936ed2 100644 --- a/src/NzbDrone.Common/OAuth/OAuthTools.cs +++ b/src/NzbDrone.Common/OAuth/OAuthTools.cs @@ -55,7 +55,7 @@ namespace NzbDrone.Common.OAuth #endif /// - /// Generates a random 16-byte lowercase alphanumeric string. + /// Generates a random 16-byte lowercase alphanumeric string. /// /// /// @@ -259,7 +259,7 @@ namespace NzbDrone.Common.OAuth } /// - /// Creates a request elements concatentation value to send with a request. + /// Creates a request elements concatentation value to send with a request. /// This is also known as the signature base. /// /// @@ -276,7 +276,7 @@ namespace NzbDrone.Common.OAuth var requestMethod = string.Concat(method.ToUpper(), "&"); var requestUrl = string.Concat(UrlEncodeRelaxed(ConstructRequestUrl(new Uri(url))), "&"); var requestParameters = UrlEncodeRelaxed(NormalizeRequestParameters(parameters)); - + sb.Append(requestMethod); sb.Append(requestUrl); sb.Append(requestParameters); @@ -293,7 +293,7 @@ namespace NzbDrone.Common.OAuth /// The signature base /// The consumer key /// - public static string GetSignature(OAuthSignatureMethod signatureMethod, + public static string GetSignature(OAuthSignatureMethod signatureMethod, string signatureBase, string consumerSecret) { @@ -311,7 +311,7 @@ namespace NzbDrone.Common.OAuth /// The consumer key /// public static string GetSignature(OAuthSignatureMethod signatureMethod, - OAuthSignatureTreatment signatureTreatment, + OAuthSignatureTreatment signatureTreatment, string signatureBase, string consumerSecret) { @@ -327,7 +327,7 @@ namespace NzbDrone.Common.OAuth /// The consumer secret /// The token secret /// - public static string GetSignature(OAuthSignatureMethod signatureMethod, + public static string GetSignature(OAuthSignatureMethod signatureMethod, string signatureBase, string consumerSecret, string tokenSecret) @@ -345,7 +345,7 @@ namespace NzbDrone.Common.OAuth /// The consumer secret /// The token secret /// - public static string GetSignature(OAuthSignatureMethod signatureMethod, + public static string GetSignature(OAuthSignatureMethod signatureMethod, OAuthSignatureTreatment signatureTreatment, string signatureBase, string consumerSecret, diff --git a/src/NzbDrone.Common/OAuth/WebParameterCollection.cs b/src/NzbDrone.Common/OAuth/WebParameterCollection.cs index 3f4582813..511aec066 100644 --- a/src/NzbDrone.Common/OAuth/WebParameterCollection.cs +++ b/src/NzbDrone.Common/OAuth/WebParameterCollection.cs @@ -15,7 +15,7 @@ namespace NzbDrone.Common.OAuth get { var parameters = this.Where(p => p.Name.Equals(name)); - + if(parameters.Count() == 0) { return null; @@ -142,7 +142,7 @@ namespace NzbDrone.Common.OAuth public virtual void Add(WebParameter parameter) { - + _parameters.Add(parameter); } diff --git a/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs b/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs index c617cddb1..c3d0372d6 100644 --- a/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs +++ b/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs @@ -11,17 +11,17 @@ namespace NzbDrone.Common.TPL /// Whether the current thread is processing work items. [ThreadStatic] private static bool _currentThreadIsProcessingItems; - /// The list of tasks to be executed. - private readonly LinkedList _tasks = new LinkedList(); // protected by lock(_tasks) - /// The maximum concurrency level allowed by this scheduler. + /// The list of tasks to be executed. + private readonly LinkedList _tasks = new LinkedList(); // protected by lock(_tasks) + /// The maximum concurrency level allowed by this scheduler. private readonly int _maxDegreeOfParallelism; - /// Whether the scheduler is currently processing work items. - private int _delegatesQueuedOrRunning = 0; // protected by lock(_tasks) + /// Whether the scheduler is currently processing work items. + private int _delegatesQueuedOrRunning = 0; // protected by lock(_tasks) - /// - /// Initializes an instance of the LimitedConcurrencyLevelTaskScheduler class with the - /// specified degree of parallelism. - /// + /// + /// Initializes an instance of the LimitedConcurrencyLevelTaskScheduler class with the + /// specified degree of parallelism. + /// /// The maximum degree of parallelism provided by this scheduler. public LimitedConcurrencyLevelTaskScheduler(int maxDegreeOfParallelism) { @@ -29,12 +29,12 @@ namespace NzbDrone.Common.TPL _maxDegreeOfParallelism = maxDegreeOfParallelism; } - /// Queues a task to the scheduler. + /// Queues a task to the scheduler. /// The task to be queued. protected sealed override void QueueTask(Task task) { - // Add the task to the list of tasks to be processed. If there aren't enough - // delegates currently queued or running to process tasks, schedule another. + // Add the task to the list of tasks to be processed. If there aren't enough + // delegates currently queued or running to process tasks, schedule another. lock (_tasks) { _tasks.AddLast(task); @@ -46,26 +46,26 @@ namespace NzbDrone.Common.TPL } } - /// - /// Informs the ThreadPool that there's work to be executed for this scheduler. - /// + /// + /// Informs the ThreadPool that there's work to be executed for this scheduler. + /// private void NotifyThreadPoolOfPendingWork() { ThreadPool.UnsafeQueueUserWorkItem(_ => { - // Note that the current thread is now processing work items. + // Note that the current thread is now processing work items. // This is necessary to enable inlining of tasks into this thread. _currentThreadIsProcessingItems = true; try { - // Process all available items in the queue. + // Process all available items in the queue. while (true) { Task item; lock (_tasks) { - // When there are no more items to be processed, - // note that we're done processing, and get out. + // When there are no more items to be processed, + // note that we're done processing, and get out. if (_tasks.Count == 0) { --_delegatesQueuedOrRunning; @@ -77,44 +77,44 @@ namespace NzbDrone.Common.TPL _tasks.RemoveFirst(); } - // Execute the task we pulled out of the queue + // Execute the task we pulled out of the queue base.TryExecuteTask(item); } } - // We're done processing items on the current thread + // We're done processing items on the current thread finally { _currentThreadIsProcessingItems = false; } }, null); } - /// Attempts to execute the specified task on the current thread. + /// Attempts to execute the specified task on the current thread. /// The task to be executed. /// - /// Whether the task could be executed on the current thread. + /// Whether the task could be executed on the current thread. protected sealed override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued) { - // If this thread isn't already processing a task, we don't support inlining + // If this thread isn't already processing a task, we don't support inlining if (!_currentThreadIsProcessingItems) return false; - // If the task was previously queued, remove it from the queue + // If the task was previously queued, remove it from the queue if (taskWasPreviouslyQueued) TryDequeue(task); - // Try to run the task. + // Try to run the task. return base.TryExecuteTask(task); } - /// Attempts to remove a previously scheduled task from the scheduler. + /// Attempts to remove a previously scheduled task from the scheduler. /// The task to be removed. - /// Whether the task could be found and removed. + /// Whether the task could be found and removed. protected sealed override bool TryDequeue(Task task) { lock (_tasks) return _tasks.Remove(task); } - /// Gets the maximum concurrency level supported by this scheduler. + /// Gets the maximum concurrency level supported by this scheduler. public sealed override int MaximumConcurrencyLevel => _maxDegreeOfParallelism; - /// Gets an enumerable of the tasks currently scheduled on this scheduler. - /// An enumerable of the tasks currently scheduled. + /// Gets an enumerable of the tasks currently scheduled on this scheduler. + /// An enumerable of the tasks currently scheduled. protected sealed override IEnumerable GetScheduledTasks() { bool lockTaken = false; diff --git a/src/NzbDrone.Common/TinyIoC.cs b/src/NzbDrone.Common/TinyIoC.cs index bec99a30a..2edfd4f94 100644 --- a/src/NzbDrone.Common/TinyIoC.cs +++ b/src/NzbDrone.Common/TinyIoC.cs @@ -676,7 +676,7 @@ namespace TinyIoC { /// /// Attempt to resolve type, even if the type isn't registered. - /// + /// /// Registered types/options will always take precedence. /// AttemptResolve, @@ -689,7 +689,7 @@ namespace TinyIoC /// /// Attempt to resolve unregistered type if requested type is generic /// and no registration exists for the specific generic parameters used. - /// + /// /// Registered types/options will always take precedence. /// GenericsOnly @@ -904,7 +904,7 @@ namespace TinyIoC #endif /// /// Switches to a custom lifetime manager factory if possible. - /// + /// /// Usually used for RegisterOptions "To*" extension methods such as the ASP.Net per-request one. /// /// RegisterOptions instance @@ -994,7 +994,7 @@ namespace TinyIoC #region Registration /// /// Attempt to automatically register all non-generic classes and interfaces in the current app domain. - /// + /// /// If more than one class implements an interface then only one implementation will be registered /// although no error will be thrown. /// @@ -1010,7 +1010,7 @@ namespace TinyIoC /// /// Attempt to automatically register all non-generic classes and interfaces in the current app domain. /// Types will only be registered if they pass the supplied registration predicate. - /// + /// /// If more than one class implements an interface then only one implementation will be registered /// although no error will be thrown. /// @@ -1056,7 +1056,7 @@ namespace TinyIoC /// /// Attempt to automatically register all non-generic classes and interfaces in the specified assemblies - /// + /// /// If more than one class implements an interface then only one implementation will be registered /// although no error will be thrown. /// @@ -1069,7 +1069,7 @@ namespace TinyIoC /// /// Attempt to automatically register all non-generic classes and interfaces in the specified assemblies /// Types will only be registered if they pass the supplied registration predicate. - /// + /// /// If more than one class implements an interface then only one implementation will be registered /// although no error will be thrown. /// @@ -1361,7 +1361,7 @@ namespace TinyIoC /// /// Register multiple implementations of a type. - /// + /// /// Internally this registers each implementation using the full name of the class as its registration name. /// /// Type that each implementation implements @@ -1374,7 +1374,7 @@ namespace TinyIoC /// /// Register multiple implementations of a type. - /// + /// /// Internally this registers each implementation using the full name of the class as its registration name. /// /// Type that each implementation implements @@ -1720,7 +1720,7 @@ namespace TinyIoC /// /// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists). /// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail. - /// + /// /// Note: Resolution may still fail if user defined factory registations fail to construct objects when called. /// /// Type to resolve @@ -1736,7 +1736,7 @@ namespace TinyIoC /// /// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists). /// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail. - /// + /// /// Note: Resolution may still fail if user defined factory registations fail to construct objects when called. /// /// Type to resolve @@ -1753,7 +1753,7 @@ namespace TinyIoC /// /// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists). /// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail. - /// + /// /// Note: Resolution may still fail if user defined factory registations fail to construct objects when called. /// /// Type to resolve @@ -1770,7 +1770,7 @@ namespace TinyIoC /// /// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists). /// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail. - /// + /// /// Note: Resolution may still fail if user defined factory registations fail to construct objects when called. /// /// Type to resolve @@ -1845,7 +1845,7 @@ namespace TinyIoC /// /// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists). /// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail. - /// + /// /// Note: Resolution may still fail if user defined factory registations fail to construct objects when called. /// /// Type to resolve @@ -1862,7 +1862,7 @@ namespace TinyIoC /// /// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists). /// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail. - /// + /// /// Note: Resolution may still fail if user defined factory registations fail to construct objects when called. /// /// Type to resolve @@ -1880,7 +1880,7 @@ namespace TinyIoC /// /// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists). /// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail. - /// + /// /// Note: Resolution may still fail if user defined factory registations fail to construct objects when called. /// /// Type to resolve @@ -1898,7 +1898,7 @@ namespace TinyIoC /// /// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists). /// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail. - /// + /// /// Note: Resolution may still fail if user defined factory registations fail to construct objects when called. /// /// Type to resolve @@ -2360,7 +2360,7 @@ namespace TinyIoC { /// /// Whether to assume this factory sucessfully constructs its objects - /// + /// /// Generally set to true for delegate style factories as CanResolve cannot delve /// into the delegates they contain. /// @@ -2638,7 +2638,7 @@ namespace TinyIoC /// /// Stores an particular instance to return for a type - /// + /// /// Stores the instance with a weak reference /// private class WeakInstanceFactory : ObjectFactoryBase, IDisposable @@ -3427,7 +3427,7 @@ namespace TinyIoC var isParameterOverload = parameters.ContainsKey(parameter.Name); - //#if NETFX_CORE + //#if NETFX_CORE // if (parameter.ParameterType.GetTypeInfo().IsPrimitive && !isParameterOverload) //#else if (parameter.ParameterType.IsPrimitive() && !isParameterOverload) @@ -3578,7 +3578,7 @@ namespace TinyIoC // We could lock the cache here, but there's no real side // effect to two threads creating the same ObjectConstructor - // at the same time, compared to the cost of a lock for + // at the same time, compared to the cost of a lock for // every creation. var constructorParams = constructor.GetParameters(); var lambdaParams = Expression.Parameter(typeof(object[]), "parameters"); diff --git a/src/NzbDrone.Core.Test/Datastore/MappingExtentionFixture.cs b/src/NzbDrone.Core.Test/Datastore/MappingExtentionFixture.cs index a8fc9670f..fee343581 100644 --- a/src/NzbDrone.Core.Test/Datastore/MappingExtentionFixture.cs +++ b/src/NzbDrone.Core.Test/Datastore/MappingExtentionFixture.cs @@ -42,7 +42,7 @@ namespace NzbDrone.Core.Test.Datastore MapRepository.Instance.RegisterTypeConverter(typeof(List), new EmbeddedDocumentConverter()); MapRepository.Instance.RegisterTypeConverter(typeof(EmbeddedType), new EmbeddedDocumentConverter()); MapRepository.Instance.RegisterTypeConverter(typeof(int), new Int32Converter()); - + } diff --git a/src/NzbDrone.Core.Test/Datastore/Migration/079_dedupe_tagsFixture.cs b/src/NzbDrone.Core.Test/Datastore/Migration/079_dedupe_tagsFixture.cs index e333fb9a1..296c8cf8b 100644 --- a/src/NzbDrone.Core.Test/Datastore/Migration/079_dedupe_tagsFixture.cs +++ b/src/NzbDrone.Core.Test/Datastore/Migration/079_dedupe_tagsFixture.cs @@ -33,7 +33,7 @@ namespace NzbDrone.Core.Test.Datastore.Migration c.Insert.IntoTable("Tags").Row(new { - Label = "test" + Label = "test" }); }); diff --git a/src/NzbDrone.Core.Test/Datastore/Migration/085_expand_transmission_urlbaseFixture.cs b/src/NzbDrone.Core.Test/Datastore/Migration/085_expand_transmission_urlbaseFixture.cs index 0b1f7460d..655b717ee 100644 --- a/src/NzbDrone.Core.Test/Datastore/Migration/085_expand_transmission_urlbaseFixture.cs +++ b/src/NzbDrone.Core.Test/Datastore/Migration/085_expand_transmission_urlbaseFixture.cs @@ -15,7 +15,7 @@ namespace NzbDrone.Core.Test.Datastore.Migration { var db = WithMigrationTestDb(c => { - c.Insert.IntoTable("DownloadClients").Row(new + c.Insert.IntoTable("DownloadClients").Row(new { Enable = 1, Name = "Deluge", diff --git a/src/NzbDrone.Core.Test/Datastore/Migration/086_pushbullet_device_idsFixture.cs b/src/NzbDrone.Core.Test/Datastore/Migration/086_pushbullet_device_idsFixture.cs index 20a8e063a..a478ef5d4 100644 --- a/src/NzbDrone.Core.Test/Datastore/Migration/086_pushbullet_device_idsFixture.cs +++ b/src/NzbDrone.Core.Test/Datastore/Migration/086_pushbullet_device_idsFixture.cs @@ -15,7 +15,7 @@ namespace NzbDrone.Core.Test.Datastore.Migration { var db = WithMigrationTestDb(c => { - c.Insert.IntoTable("Notifications").Row(new + c.Insert.IntoTable("Notifications").Row(new { OnGrab = false, OnDownload = false, @@ -71,7 +71,7 @@ namespace NzbDrone.Core.Test.Datastore.Migration OnUpgrade = false, Name = "PushBullet", Implementation = "PushBullet", - Settings = new + Settings = new { ApiKey = "my_api_key", DeviceId = deviceId diff --git a/src/NzbDrone.Core.Test/Datastore/Migration/090_update_kickass_urlFixture.cs b/src/NzbDrone.Core.Test/Datastore/Migration/090_update_kickass_urlFixture.cs index 292344127..716dedb8b 100644 --- a/src/NzbDrone.Core.Test/Datastore/Migration/090_update_kickass_urlFixture.cs +++ b/src/NzbDrone.Core.Test/Datastore/Migration/090_update_kickass_urlFixture.cs @@ -20,7 +20,7 @@ namespace NzbDrone.Core.Test.Datastore.Migration { var db = WithMigrationTestDb(c => { - c.Insert.IntoTable("Indexers").Row(new + c.Insert.IntoTable("Indexers").Row(new { Name = "Kickass_wrong_url", Implementation = "KickassTorrents", diff --git a/src/NzbDrone.Core.Test/Datastore/SqliteSchemaDumperTests/SqliteSchemaDumperFixture.cs b/src/NzbDrone.Core.Test/Datastore/SqliteSchemaDumperTests/SqliteSchemaDumperFixture.cs index 218b5e93f..43f05bd9c 100644 --- a/src/NzbDrone.Core.Test/Datastore/SqliteSchemaDumperTests/SqliteSchemaDumperFixture.cs +++ b/src/NzbDrone.Core.Test/Datastore/SqliteSchemaDumperTests/SqliteSchemaDumperFixture.cs @@ -64,7 +64,7 @@ namespace NzbDrone.Core.Test.Datastore.SqliteSchemaDumperTests result.Columns.First().Name.Should().Be("MyId"); result.Columns.First().Type.Should().BeNull(); } - + [Test] public void should_ignore_unknown_symbols() { diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/ProtocolSpecificationFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/ProtocolSpecificationFixture.cs index d25c7ac85..f1ef0ddd9 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/ProtocolSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/ProtocolSpecificationFixture.cs @@ -23,7 +23,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests _remoteEpisode = new RemoteMovie(); _remoteEpisode.Release = new ReleaseInfo(); _remoteEpisode.Movie = new Movie(); - + _delayProfile = new DelayProfile(); Mocker.GetMock() diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/RawDiskSpecificationFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/RawDiskSpecificationFixture.cs index f7e365f7b..b3f63dfde 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/RawDiskSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/RawDiskSpecificationFixture.cs @@ -31,7 +31,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests { _remoteMovie.Release.Container = container; } - + [Test] public void should_return_true_if_no_container_specified() { diff --git a/src/NzbDrone.Core.Test/Download/DownloadApprovedReportsTests/DownloadApprovedFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadApprovedReportsTests/DownloadApprovedFixture.cs index 1e6da9404..49ff2f420 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadApprovedReportsTests/DownloadApprovedFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadApprovedReportsTests/DownloadApprovedFixture.cs @@ -57,7 +57,7 @@ namespace NzbDrone.Core.Test.Download.DownloadApprovedReportsTests MovieTitle = "A Movie", }, Movie = movie, - + Release = new ReleaseInfo() { PublishDate = DateTime.UtcNow, diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DelugeTests/DelugeFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DelugeTests/DelugeFixture.cs index e25a7cc6b..7ac27df8a 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DelugeTests/DelugeFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DelugeTests/DelugeFixture.cs @@ -119,7 +119,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests .Returns("CBC2F069FE8BB2F544EAE707D75BCD3DE9DCF951".ToLower()) .Callback(PrepareClientToReturnQueuedItem); } - + protected virtual void GivenTorrents(List torrents) { if (torrents == null) @@ -134,7 +134,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests protected void PrepareClientToReturnQueuedItem() { - GivenTorrents(new List + GivenTorrents(new List { _queued }); @@ -142,7 +142,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests protected void PrepareClientToReturnDownloadingItem() { - GivenTorrents(new List + GivenTorrents(new List { _downloading }); @@ -150,7 +150,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests protected void PrepareClientToReturnFailedItem() { - GivenTorrents(new List + GivenTorrents(new List { _failed }); diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs index e782072ea..13519da25 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/QBittorrentTests/QBittorrentFixture.cs @@ -565,7 +565,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests var item = Subject.GetItems().Single(); item.CanBeRemoved.Should().BeFalse(); item.CanMoveFiles.Should().BeFalse(); - + var item2 = Subject.GetItems().Single(); Mocker.GetMock() diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixtureBase.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixtureBase.cs index eb2af17a3..d6d4434c2 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixtureBase.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixtureBase.cs @@ -144,7 +144,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests .Setup(s => s.AddTorrentFromData(It.IsAny(), It.IsAny(), It.IsAny())) .Callback(PrepareClientToReturnQueuedItem); } - + protected virtual void GivenTorrents(List torrents) { if (torrents == null) @@ -159,7 +159,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests protected void PrepareClientToReturnQueuedItem() { - GivenTorrents(new List + GivenTorrents(new List { _queued }); @@ -167,7 +167,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests protected void PrepareClientToReturnDownloadingItem() { - GivenTorrents(new List + GivenTorrents(new List { _downloading }); @@ -175,7 +175,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests protected void PrepareClientToReturnFailedItem() { - GivenTorrents(new List + GivenTorrents(new List { _failed }); diff --git a/src/NzbDrone.Core.Test/Download/DownloadServiceFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadServiceFixture.cs index 137c524ce..f6157b08b 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadServiceFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadServiceFixture.cs @@ -74,7 +74,7 @@ namespace NzbDrone.Core.Test.Download { var mock = WithUsenetClient(); mock.Setup(s => s.Download(It.IsAny())); - + Subject.DownloadReport(_parseResult); VerifyEventPublished(); @@ -85,7 +85,7 @@ namespace NzbDrone.Core.Test.Download { var mock = WithUsenetClient(); mock.Setup(s => s.Download(It.IsAny())); - + Subject.DownloadReport(_parseResult); mock.Verify(s => s.Download(It.IsAny()), Times.Once()); @@ -109,7 +109,7 @@ namespace NzbDrone.Core.Test.Download var mock = WithUsenetClient(); mock.Setup(s => s.Download(It.IsAny())) .Callback(v => { - throw new ReleaseDownloadException(v.Release, "Error", new WebException()); + throw new ReleaseDownloadException(v.Release, "Error", new WebException()); }); Assert.Throws(() => Subject.DownloadReport(_parseResult)); @@ -128,7 +128,7 @@ namespace NzbDrone.Core.Test.Download var mock = WithUsenetClient(); mock.Setup(s => s.Download(It.IsAny())) .Callback(v => { - throw new ReleaseDownloadException(v.Release, "Error", new TooManyRequestsException(request, response)); + throw new ReleaseDownloadException(v.Release, "Error", new TooManyRequestsException(request, response)); }); Assert.Throws(() => Subject.DownloadReport(_parseResult)); diff --git a/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/RemoveRejectedFixture.cs b/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/RemoveRejectedFixture.cs index 43f8c2246..aecfec726 100644 --- a/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/RemoveRejectedFixture.cs +++ b/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/RemoveRejectedFixture.cs @@ -69,7 +69,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests Mocker.GetMock() .Setup(s => s.GetMovie(It.IsAny())) .Returns(_movie); - + Mocker.GetMock() .Setup(s => s.GetMovies(It.IsAny>())) .Returns(new List { _movie }); diff --git a/src/NzbDrone.Core.Test/FluentTest.cs b/src/NzbDrone.Core.Test/FluentTest.cs index 752dff23f..f9116afcb 100644 --- a/src/NzbDrone.Core.Test/FluentTest.cs +++ b/src/NzbDrone.Core.Test/FluentTest.cs @@ -9,7 +9,7 @@ using NzbDrone.Test.Common; namespace NzbDrone.Core.Test { [TestFixture] - + public class FluentTest : CoreTest { [TestCase(null, "def", "def")] @@ -87,10 +87,10 @@ namespace NzbDrone.Core.Test [Test] public void MaxOrDefault_should_return_zero_when_collection_is_empty() { - - + + var result = (new List()).MaxOrDefault(); //Resolve @@ -100,10 +100,10 @@ namespace NzbDrone.Core.Test [Test] public void MaxOrDefault_should_return_max_when_collection_is_not_empty() { - + var list = new List { 6, 4, 5, 3, 8, 10 }; - + var result = list.MaxOrDefault(); //Resolve @@ -113,10 +113,10 @@ namespace NzbDrone.Core.Test [Test] public void MaxOrDefault_should_return_zero_when_collection_is_null() { - + List list = null; - + var result = list.MaxOrDefault(); //Resolve @@ -126,10 +126,10 @@ namespace NzbDrone.Core.Test [Test] public void Truncate_should_truncate_strings_to_max_specified_number_of_bytes() { - + var str = ReadAllText("Files/LongOverview.txt"); - + var resultString = str.Truncate(1000); //Resolve @@ -140,10 +140,10 @@ namespace NzbDrone.Core.Test [Test] public void Truncate_should_not_truncate_string_shorter_than_max_bytes() { - + var str = "Hello World"; - + var resultString = str.Truncate(1000); //Resolve @@ -154,10 +154,10 @@ namespace NzbDrone.Core.Test [Test] public void MinOrDefault_should_return_zero_when_collection_is_empty() { - - + + var result = (new List()).MinOrDefault(); //Resolve @@ -167,10 +167,10 @@ namespace NzbDrone.Core.Test [Test] public void MinOrDefault_should_return_min_when_collection_is_not_empty() { - + var list = new List { 6, 4, 5, 3, 8, 10 }; - + var result = list.MinOrDefault(); //Resolve @@ -180,10 +180,10 @@ namespace NzbDrone.Core.Test [Test] public void MinOrDefault_should_return_zero_when_collection_is_null() { - + List list = null; - + var result = list.MinOrDefault(); //Resolve diff --git a/src/NzbDrone.Core.Test/Framework/DirectDataMapper.cs b/src/NzbDrone.Core.Test/Framework/DirectDataMapper.cs index 27b4354c1..d05aed778 100644 --- a/src/NzbDrone.Core.Test/Framework/DirectDataMapper.cs +++ b/src/NzbDrone.Core.Test/Framework/DirectDataMapper.cs @@ -25,7 +25,7 @@ namespace NzbDrone.Core.Test.Framework _providerFactory = dataMapper.ProviderFactory; _connectionString = dataMapper.ConnectionString; } - + private DbConnection OpenConnection() { var connection = _providerFactory.CreateConnection(); diff --git a/src/NzbDrone.Core.Test/HealthCheck/Checks/ImportMechanismCheckFixture.cs b/src/NzbDrone.Core.Test/HealthCheck/Checks/ImportMechanismCheckFixture.cs index 0ab4312c3..4ca6a86d3 100644 --- a/src/NzbDrone.Core.Test/HealthCheck/Checks/ImportMechanismCheckFixture.cs +++ b/src/NzbDrone.Core.Test/HealthCheck/Checks/ImportMechanismCheckFixture.cs @@ -32,10 +32,10 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks public void should_return_warning_when_both_completeddownloadhandling_and_dronefactory_are_not_configured() { GivenCompletedDownloadHandling(false); - + Subject.Check().ShouldBeWarning(); } - + [Test] public void should_return_ok_when_no_issues_found() { diff --git a/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabFixture.cs index 56f5e7b88..64c0d1051 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabFixture.cs @@ -43,7 +43,7 @@ namespace NzbDrone.Core.Test.IndexerTests.NewznabTests Mocker.GetMock() .Setup(o => o.Execute(It.Is(v => v.Method == HttpMethod.GET))) .Returns(r => new HttpResponse(r, new HttpHeader(), recentFeed)); - + var releases = Subject.FetchRecent(); releases.Should().HaveCount(100); diff --git a/src/NzbDrone.Core.Test/IndexerTests/OmgwtfnzbsTests/OmgwtfnzbsFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/OmgwtfnzbsTests/OmgwtfnzbsFixture.cs index d79a61236..82cd7da3b 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/OmgwtfnzbsTests/OmgwtfnzbsFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/OmgwtfnzbsTests/OmgwtfnzbsFixture.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Core.Test.IndexerTests.OmgwtfnzbsTests Mocker.GetMock() .Setup(o => o.Execute(It.Is(v => v.Method == HttpMethod.GET))) .Returns(r => new HttpResponse(r, new HttpHeader(), recentFeed)); - + var releases = Subject.FetchRecent(); releases.Should().HaveCount(100); diff --git a/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TestTorrentRssIndexer.cs b/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TestTorrentRssIndexer.cs index ce7ec77b5..7a0c2989e 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TestTorrentRssIndexer.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/TorrentRssIndexerTests/TestTorrentRssIndexer.cs @@ -31,13 +31,13 @@ namespace NzbDrone.Core.Test.IndexerTests.TorrentRssIndexerTests /// private void SetupNLog() { - // Step 1. Create configuration object + // Step 1. Create configuration object var config = new LoggingConfiguration(); var fileTarget = new FileTarget(); config.AddTarget("file", fileTarget); - // Step 3. Set target properties + // Step 3. Set target properties fileTarget.FileName = "${basedir}/log.txt"; fileTarget.Layout = GetStandardLayout(); diff --git a/src/NzbDrone.Core.Test/MediaCoverTests/MediaCoverServiceFixture.cs b/src/NzbDrone.Core.Test/MediaCoverTests/MediaCoverServiceFixture.cs index 99d0a210e..a09614d08 100644 --- a/src/NzbDrone.Core.Test/MediaCoverTests/MediaCoverServiceFixture.cs +++ b/src/NzbDrone.Core.Test/MediaCoverTests/MediaCoverServiceFixture.cs @@ -36,10 +36,10 @@ namespace NzbDrone.Core.Test.MediaCoverTests private void ExecuteAndVerifyCommand(Movie movie) { Subject.HandleAsync(new MovieUpdatedEvent(movie)); - + Mocker.GetMock() .Verify(v => v.Push(It.Is(c => c.MovieId == movie.Id), It.IsAny(), It.IsAny()), Times.Once()); - + Subject.Execute(new EnsureMediaCoversCommand(movie.Id)); } diff --git a/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/UpdateMediaInfoServiceFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/UpdateMediaInfoServiceFixture.cs index 27333210f..32e012b19 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/UpdateMediaInfoServiceFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/UpdateMediaInfoServiceFixture.cs @@ -199,7 +199,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo Mocker.GetMock() .SetupGet(s => s.EnableMediaInfo) .Returns(false); - + GivenFileExists(); GivenSuccessfulScan(); @@ -222,7 +222,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo Mocker.GetMock() .SetupGet(s => s.EnableMediaInfo) .Returns(false); - + GivenFileExists(); GivenSuccessfulScan(); @@ -254,7 +254,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo Mocker.GetMock() .Verify(v => v.Update(movieFile), Times.Once()); } - + [Test] public void should_not_update_media_info_if_new_info_is_null() { @@ -270,7 +270,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo movieFile.MediaInfo.Should().NotBeNull(); } - + [Test] public void should_not_save_movie_file_if_new_info_is_null() { diff --git a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Aggregation/Aggregators/AggregateLanguageFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Aggregation/Aggregators/AggregateLanguageFixture.cs index a8d7ca89c..2ca155734 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Aggregation/Aggregators/AggregateLanguageFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Aggregation/Aggregators/AggregateLanguageFixture.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; namespace NzbDrone.Core.Test.MediaFiles.MovieImport.Aggregation.Aggregators { - [TestFixture] + [TestFixture] public class AggregateLanguageFixture : CoreTest { private LocalMovie _localMovie; diff --git a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Aggregation/Aggregators/AggregateQualityFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Aggregation/Aggregators/AggregateQualityFixture.cs index acdbcf10b..1c62cca3c 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Aggregation/Aggregators/AggregateQualityFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Aggregation/Aggregators/AggregateQualityFixture.cs @@ -13,7 +13,7 @@ using NzbDrone.Core.Test.Framework; namespace NzbDrone.Core.Test.MediaFiles.MovieImport.Aggregation.Aggregators { - [TestFixture] + [TestFixture] public class AugmentQualityFixture : CoreTest { private Mock _mediaInfoAugmenter; diff --git a/src/NzbDrone.Core.Test/MediaFiles/UpdateMovieFileQualityServiceFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/UpdateMovieFileQualityServiceFixture.cs index 8749d7a5e..866e813e9 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/UpdateMovieFileQualityServiceFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/UpdateMovieFileQualityServiceFixture.cs @@ -60,7 +60,7 @@ namespace NzbDrone.Core.Test.MediaFiles ExecuteCommand(); ExceptionVerification.ExpectedWarns(1); - + Mocker.GetMock().Verify(s => s.Update(It.IsAny()), Times.Never()); } diff --git a/src/NzbDrone.Core.Test/Messaging/Events/EventAggregatorFixture.cs b/src/NzbDrone.Core.Test/Messaging/Events/EventAggregatorFixture.cs index 19bfb493f..76561592b 100644 --- a/src/NzbDrone.Core.Test/Messaging/Events/EventAggregatorFixture.cs +++ b/src/NzbDrone.Core.Test/Messaging/Events/EventAggregatorFixture.cs @@ -95,12 +95,12 @@ namespace NzbDrone.Core.Test.Messaging.Events var handlers = new List> { - AsyncHandlerA1.Object, AsyncHandlerA1.Object, AsyncHandlerA1.Object, AsyncHandlerA1.Object, AsyncHandlerA1.Object, - AsyncHandlerA1.Object, + AsyncHandlerA1.Object, + AsyncHandlerA1.Object, AsyncHandlerA1.Object, }; diff --git a/src/NzbDrone.Core.Test/NotificationTests/NotificationBaseFixture.cs b/src/NzbDrone.Core.Test/NotificationTests/NotificationBaseFixture.cs index 53e9cb3ca..b754eae20 100644 --- a/src/NzbDrone.Core.Test/NotificationTests/NotificationBaseFixture.cs +++ b/src/NzbDrone.Core.Test/NotificationTests/NotificationBaseFixture.cs @@ -83,7 +83,7 @@ namespace NzbDrone.Core.Test.NotificationTests throw new NotImplementedException(); } - + } [Test] diff --git a/src/NzbDrone.Core.Test/NotificationTests/Xbmc/GetMoviePathFixture.cs b/src/NzbDrone.Core.Test/NotificationTests/Xbmc/GetMoviePathFixture.cs index 03f44d66c..82f8731ca 100644 --- a/src/NzbDrone.Core.Test/NotificationTests/Xbmc/GetMoviePathFixture.cs +++ b/src/NzbDrone.Core.Test/NotificationTests/Xbmc/GetMoviePathFixture.cs @@ -61,7 +61,7 @@ namespace NzbDrone.Core.Test.NotificationTests.Xbmc { ImdbId = "tt01000", Title = "Does not exist" - }; + }; } [Test] diff --git a/src/NzbDrone.Core.Test/NotificationTests/Xbmc/OnDownloadFixture.cs b/src/NzbDrone.Core.Test/NotificationTests/Xbmc/OnDownloadFixture.cs index 12ae9883b..a7fd46611 100644 --- a/src/NzbDrone.Core.Test/NotificationTests/Xbmc/OnDownloadFixture.cs +++ b/src/NzbDrone.Core.Test/NotificationTests/Xbmc/OnDownloadFixture.cs @@ -15,7 +15,7 @@ namespace NzbDrone.Core.Test.NotificationTests.Xbmc public class OnDownloadFixture : CoreTest { private DownloadMessage _downloadMessage; - + [SetUp] public void Setup() { diff --git a/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs b/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs index 63122b53c..89699a0b7 100644 --- a/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs @@ -90,7 +90,7 @@ namespace NzbDrone.Core.Test.ParserTests dirty.CleanSeriesTitle().Should().Be("wordankleword"); } } - + [Test] public void should_not_remove_a_when_at_end_of_acronym() { @@ -107,7 +107,7 @@ namespace NzbDrone.Core.Test.ParserTests dirty.CleanSeriesTitle().Should().Be("wordnkleaword"); } } - + [TestCase("the")] [TestCase("and")] [TestCase("or")] diff --git a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs index c28923019..3c1907851 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -11,7 +11,7 @@ namespace NzbDrone.Core.Test.ParserTests public class QualityParserFixture : CoreTest { - + [SetUp] public void Setup() { diff --git a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs index 3ee5319c7..ae56e308f 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs @@ -43,7 +43,7 @@ namespace NzbDrone.Core.Test.ParserTests Parser.Parser.ParseReleaseGroup(title).Should().Be(expected); } - + [TestCase("Marvels.Daredevil.S02E04.720p.WEBRip.x264-SKGTV English", "SKGTV")] [TestCase("Marvels.Daredevil.S02E04.720p.WEBRip.x264-SKGTV_English", "SKGTV")] diff --git a/src/NzbDrone.Core.Test/Profiles/Delay/DelayProfileServiceFixture.cs b/src/NzbDrone.Core.Test/Profiles/Delay/DelayProfileServiceFixture.cs index ff2df10f4..ff533103e 100644 --- a/src/NzbDrone.Core.Test/Profiles/Delay/DelayProfileServiceFixture.cs +++ b/src/NzbDrone.Core.Test/Profiles/Delay/DelayProfileServiceFixture.cs @@ -44,7 +44,7 @@ namespace NzbDrone.Core.Test.Profiles.Delay var moving = _last; var result = Subject.Reorder(moving.Id, null).OrderBy(d => d.Order).ToList(); var moved = result.First(); - + moved.Id.Should().Be(moving.Id); moved.Order.Should().Be(1); } diff --git a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs index 5e336420b..7f433f3ed 100644 --- a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs +++ b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs @@ -10,7 +10,7 @@ using NzbDrone.Core.Test.Framework; namespace NzbDrone.Core.Test.ProviderTests.RecycleBinProviderTests { [TestFixture] - + public class CleanupFixture : CoreTest { private const string RecycleBin = @"C:\Test\RecycleBin"; diff --git a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs index fbb0b1c0a..8a5b486cd 100644 --- a/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs +++ b/src/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs @@ -9,7 +9,7 @@ using NzbDrone.Core.Test.Framework; namespace NzbDrone.Core.Test.ProviderTests.RecycleBinProviderTests { [TestFixture] - + public class EmptyFixture : CoreTest { private const string RecycleBin = @"C:\Test\RecycleBin"; @@ -38,7 +38,7 @@ namespace NzbDrone.Core.Test.ProviderTests.RecycleBinProviderTests [Test] public void should_delete_all_folders() - { + { Mocker.Resolve().Empty(); Mocker.GetMock().Verify(v => v.DeleteFolder(It.IsAny(), true), Times.Exactly(3)); diff --git a/src/NzbDrone.Core.Test/RemotePathMappingsTests/RemotePathMappingServiceFixture.cs b/src/NzbDrone.Core.Test/RemotePathMappingsTests/RemotePathMappingServiceFixture.cs index c8dccb7f0..7b0777d12 100644 --- a/src/NzbDrone.Core.Test/RemotePathMappingsTests/RemotePathMappingServiceFixture.cs +++ b/src/NzbDrone.Core.Test/RemotePathMappingsTests/RemotePathMappingServiceFixture.cs @@ -72,7 +72,7 @@ namespace NzbDrone.Core.Test.RemotePathMappingsTests Subject.Remove(1); Mocker.GetMock().Verify(c => c.Delete(1), Times.Once()); } - + [TestCase("my-server.localdomain", "/mnt/storage", @"D:\mountedstorage")] [TestCase("my-server.localdomain", "/mnt/storage", @"D:\mountedstorage2")] public void adding_duplicated_mapping_should_throw(string host, string remotePath, string localPath) diff --git a/src/NzbDrone.Core/Blacklisting/BlacklistService.cs b/src/NzbDrone.Core/Blacklisting/BlacklistService.cs index af71f0c0d..28a390f72 100644 --- a/src/NzbDrone.Core/Blacklisting/BlacklistService.cs +++ b/src/NzbDrone.Core/Blacklisting/BlacklistService.cs @@ -34,7 +34,7 @@ namespace NzbDrone.Core.Blacklisting public bool Blacklisted(int movieId, ReleaseInfo release) { var blacklistedByTitle = _blacklistRepository.BlacklistedByTitle(movieId, release.Title); - + if (release.DownloadProtocol == DownloadProtocol.Torrent) { var torrentInfo = release as TorrentInfo; diff --git a/src/NzbDrone.Core/CustomFormats/CustomFormatService.cs b/src/NzbDrone.Core/CustomFormats/CustomFormatService.cs index 8b68980aa..82bf3b355 100644 --- a/src/NzbDrone.Core/CustomFormats/CustomFormatService.cs +++ b/src/NzbDrone.Core/CustomFormats/CustomFormatService.cs @@ -131,12 +131,12 @@ namespace NzbDrone.Core.CustomFormats Func, TModel> updateFunc, int customFormatId) where TModel : ModelBase, new() { var allItems = repository.All(); - + var toUpdate = allItems.Where(r => queryFunc(r).Exists(c => c.Id == customFormatId)).Select(r => { return updateFunc(r, queryFunc(r).Where(c => c.Id != customFormatId).ToList()); }); - + repository.UpdateMany(toUpdate.ToList()); } diff --git a/src/NzbDrone.Core/Datastore/ConnectionStringFactory.cs b/src/NzbDrone.Core/Datastore/ConnectionStringFactory.cs index 804055c54..9bdd133f7 100644 --- a/src/NzbDrone.Core/Datastore/ConnectionStringFactory.cs +++ b/src/NzbDrone.Core/Datastore/ConnectionStringFactory.cs @@ -40,7 +40,7 @@ namespace NzbDrone.Core.Datastore connectionBuilder.JournalMode = OsInfo.IsOsx ? SQLiteJournalModeEnum.Truncate : SQLiteJournalModeEnum.Wal; connectionBuilder.Pooling = true; connectionBuilder.Version = 3; - + if (OsInfo.IsOsx) { connectionBuilder.Add("Full FSync", true); diff --git a/src/NzbDrone.Core/Datastore/Converters/CustomFormatIntConverter.cs b/src/NzbDrone.Core/Datastore/Converters/CustomFormatIntConverter.cs index eb41ceb0a..237d6bcd4 100644 --- a/src/NzbDrone.Core/Datastore/Converters/CustomFormatIntConverter.cs +++ b/src/NzbDrone.Core/Datastore/Converters/CustomFormatIntConverter.cs @@ -51,7 +51,7 @@ namespace NzbDrone.Core.Datastore.Converters { //throw new Exception("Attempted to save an unknown custom format! Make sure you do not have stale custom formats lying around!"); } - + return quality.Id; } diff --git a/src/NzbDrone.Core/Datastore/Extensions/MappingExtensions.cs b/src/NzbDrone.Core/Datastore/Extensions/MappingExtensions.cs index 13a4e7c43..39a831a09 100644 --- a/src/NzbDrone.Core/Datastore/Extensions/MappingExtensions.cs +++ b/src/NzbDrone.Core/Datastore/Extensions/MappingExtensions.cs @@ -20,7 +20,7 @@ namespace NzbDrone.Core.Datastore.Extensions { return RegisterModel(mapBuilder, tableName).Ignore(c => c.ImplementationName); } - + public static ColumnMapBuilder RegisterModel(this FluentMappings.MappingsFluentEntity mapBuilder, string tableName = null) where T : ModelBase, new() { return mapBuilder.Table.MapTable(tableName) diff --git a/src/NzbDrone.Core/Datastore/Extensions/PagingSpecExtensions.cs b/src/NzbDrone.Core/Datastore/Extensions/PagingSpecExtensions.cs index f2c5fbf72..f81aacad3 100644 --- a/src/NzbDrone.Core/Datastore/Extensions/PagingSpecExtensions.cs +++ b/src/NzbDrone.Core/Datastore/Extensions/PagingSpecExtensions.cs @@ -41,4 +41,4 @@ namespace NzbDrone.Core.Datastore.Extensions } } } - + diff --git a/src/NzbDrone.Core/Datastore/Extensions/RelationshipExtensions.cs b/src/NzbDrone.Core/Datastore/Extensions/RelationshipExtensions.cs index 479304b0c..7c91fec6a 100644 --- a/src/NzbDrone.Core/Datastore/Extensions/RelationshipExtensions.cs +++ b/src/NzbDrone.Core/Datastore/Extensions/RelationshipExtensions.cs @@ -15,8 +15,8 @@ namespace NzbDrone.Core.Datastore.Extensions return relationshipBuilder.For(portalExpression.GetMemberName()) .LazyLoad( condition: parent => childIdSelector(parent) > 0, - query: (db, parent) => - { + query: (db, parent) => + { var id = childIdSelector(parent); return db.Query().Where(c => c.Id == id).SingleOrDefault(); } diff --git a/src/NzbDrone.Core/Datastore/Migration/029_add_formats_to_naming_config.cs b/src/NzbDrone.Core/Datastore/Migration/029_add_formats_to_naming_config.cs index 6d3dd897b..1bce60081 100644 --- a/src/NzbDrone.Core/Datastore/Migration/029_add_formats_to_naming_config.cs +++ b/src/NzbDrone.Core/Datastore/Migration/029_add_formats_to_naming_config.cs @@ -123,7 +123,7 @@ namespace NzbDrone.Core.Datastore.Migration EpisodeSeparator = "x" }, - new + new { Id = 1, Name = "01x05", diff --git a/src/NzbDrone.Core/Datastore/Migration/045_add_indexes.cs b/src/NzbDrone.Core/Datastore/Migration/045_add_indexes.cs index 4ac4e0034..c37a9fc37 100644 --- a/src/NzbDrone.Core/Datastore/Migration/045_add_indexes.cs +++ b/src/NzbDrone.Core/Datastore/Migration/045_add_indexes.cs @@ -11,10 +11,10 @@ namespace NzbDrone.Core.Datastore.Migration Create.Index().OnTable("Blacklist").OnColumn("SeriesId"); Create.Index().OnTable("EpisodeFiles").OnColumn("SeriesId"); - + Create.Index().OnTable("Episodes").OnColumn("EpisodeFileId"); Create.Index().OnTable("Episodes").OnColumn("SeriesId"); - + Create.Index().OnTable("History").OnColumn("EpisodeId"); Create.Index().OnTable("History").OnColumn("Date"); diff --git a/src/NzbDrone.Core/Datastore/Migration/051_download_client_import.cs b/src/NzbDrone.Core/Datastore/Migration/051_download_client_import.cs index 549b92e59..ff81b765e 100644 --- a/src/NzbDrone.Core/Datastore/Migration/051_download_client_import.cs +++ b/src/NzbDrone.Core/Datastore/Migration/051_download_client_import.cs @@ -236,7 +236,7 @@ namespace NzbDrone.Core.Datastore.Migration updateHistoryCmd.ExecuteNonQuery(); } } - + _logger.Info("Updated old History items. {0}/{1} old ImportedEvents were associated with GrabbedEvents.", historyItemsToAssociate.Count, numHistoryItemsNotAssociated); } } diff --git a/src/NzbDrone.Core/Datastore/Migration/070_delay_profile.cs b/src/NzbDrone.Core/Datastore/Migration/070_delay_profile.cs index 1c9c7e58b..11c92ce0c 100644 --- a/src/NzbDrone.Core/Datastore/Migration/070_delay_profile.cs +++ b/src/NzbDrone.Core/Datastore/Migration/070_delay_profile.cs @@ -82,7 +82,7 @@ namespace NzbDrone.Core.Datastore.Migration { getProfilesCmd.Transaction = tran; getProfilesCmd.CommandText = @"SELECT Id, GrabDelay FROM Profiles"; - + using (IDataReader profileReader = getProfilesCmd.ExecuteReader()) { while (profileReader.Read()) diff --git a/src/NzbDrone.Core/Datastore/Migration/085_expand_transmission_urlbase.cs b/src/NzbDrone.Core/Datastore/Migration/085_expand_transmission_urlbase.cs index 92fc9ec2f..4855c6a3d 100644 --- a/src/NzbDrone.Core/Datastore/Migration/085_expand_transmission_urlbase.cs +++ b/src/NzbDrone.Core/Datastore/Migration/085_expand_transmission_urlbase.cs @@ -34,7 +34,7 @@ namespace NzbDrone.Core.Datastore.Migration var settings = Json.Deserialize>(settingsJson); var urlBase = settings.GetValueOrDefault("urlBase", "") as string; - + if (urlBase.IsNullOrWhiteSpace()) { settings["urlBase"] = "/transmission/"; diff --git a/src/NzbDrone.Core/Datastore/Migration/109_add_movie_formats_to_naming_config.cs b/src/NzbDrone.Core/Datastore/Migration/109_add_movie_formats_to_naming_config.cs index 6812fbb35..786977b2c 100644 --- a/src/NzbDrone.Core/Datastore/Migration/109_add_movie_formats_to_naming_config.cs +++ b/src/NzbDrone.Core/Datastore/Migration/109_add_movie_formats_to_naming_config.cs @@ -34,12 +34,12 @@ namespace NzbDrone.Core.Datastore.Migration movieTitlePattern = "{Movie Title}"; - var standardMovieFormat = string.Format("{0} {1} {2}", movieTitlePattern, + var standardMovieFormat = string.Format("{0} {1} {2}", movieTitlePattern, movieYearPattern, qualityFormat); var movieFolderFormat = string.Format("{0} {1}", movieTitlePattern, movieYearPattern); - + using (IDbCommand updateCmd = conn.CreateCommand()) { diff --git a/src/NzbDrone.Core/Datastore/Migration/110_add_physical_release_to_table.cs b/src/NzbDrone.Core/Datastore/Migration/110_add_physical_release_to_table.cs index 3299b4943..b4412bb32 100644 --- a/src/NzbDrone.Core/Datastore/Migration/110_add_physical_release_to_table.cs +++ b/src/NzbDrone.Core/Datastore/Migration/110_add_physical_release_to_table.cs @@ -12,7 +12,7 @@ namespace NzbDrone.Core.Datastore.Migration } - - + + } } diff --git a/src/NzbDrone.Core/Datastore/Migration/126_update_qualities_and_profiles.cs b/src/NzbDrone.Core/Datastore/Migration/126_update_qualities_and_profiles.cs index 9c44ecb5b..efece9a27 100644 --- a/src/NzbDrone.Core/Datastore/Migration/126_update_qualities_and_profiles.cs +++ b/src/NzbDrone.Core/Datastore/Migration/126_update_qualities_and_profiles.cs @@ -19,7 +19,7 @@ namespace NzbDrone.Core.Datastore.Migration updater.SplitQualityAppend(0, 26); // TELESYNC AFTER Unknown updater.SplitQualityAppend(0, 25); // CAM AFTER Unknown updater.SplitQualityAppend(0, 24); // WORKPRINT AFTER Unknown - + updater.SplitQualityPrepend(2, 23); // DVDR BEFORE DVD updater.SplitQualityPrepend(2, 28); // DVDSCR BEFORE DVD updater.SplitQualityPrepend(2, 29); // REGIONAL BEFORE DVD diff --git a/src/NzbDrone.Core/Datastore/Migration/141_fix_duplicate_alt_titles.cs b/src/NzbDrone.Core/Datastore/Migration/141_fix_duplicate_alt_titles.cs index e245bfe4f..faaa8424e 100644 --- a/src/NzbDrone.Core/Datastore/Migration/141_fix_duplicate_alt_titles.cs +++ b/src/NzbDrone.Core/Datastore/Migration/141_fix_duplicate_alt_titles.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Core.Datastore.Migration cmd.CommandText = "DELETE FROM AlternativeTitles WHERE rowid NOT IN ( SELECT MIN(rowid) FROM AlternativeTitles GROUP BY CleanTitle )"; cmd.ExecuteNonQuery(); - + } } } diff --git a/src/NzbDrone.Core/Datastore/Migration/144_add_cookies_to_indexer_status.cs b/src/NzbDrone.Core/Datastore/Migration/144_add_cookies_to_indexer_status.cs index f47f0a2b2..fb90202d9 100644 --- a/src/NzbDrone.Core/Datastore/Migration/144_add_cookies_to_indexer_status.cs +++ b/src/NzbDrone.Core/Datastore/Migration/144_add_cookies_to_indexer_status.cs @@ -10,7 +10,7 @@ namespace NzbDrone.Core.Datastore.Migration { Alter.Table("IndexerStatus").AddColumn("Cookies").AsString().Nullable() .AddColumn("CookiesExpirationDate").AsDateTime().Nullable(); - + } } } diff --git a/src/NzbDrone.Core/Datastore/Migration/159_add_webrip_qualities.cs b/src/NzbDrone.Core/Datastore/Migration/159_add_webrip_qualities.cs index 2295cf3ba..effa7b520 100644 --- a/src/NzbDrone.Core/Datastore/Migration/159_add_webrip_qualities.cs +++ b/src/NzbDrone.Core/Datastore/Migration/159_add_webrip_qualities.cs @@ -116,7 +116,7 @@ namespace NzbDrone.Core.Datastore.Migration var isGrouped = !profile.Items.Any(p => p.Quality == find); - + if (findIndex > -1 && !isGrouped) { var findQuality = profile.Items[findIndex]; diff --git a/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSchemaDumper.cs b/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSchemaDumper.cs index 6b8dc19ca..e6ad4dd52 100644 --- a/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSchemaDumper.cs +++ b/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSchemaDumper.cs @@ -87,7 +87,7 @@ namespace NzbDrone.Core.Datastore.Migration.Framework var column = new ColumnDefinition(); column.Name = ParseIdentifier(reader); - + reader.TrimBuffer(); reader.Read(); @@ -131,7 +131,7 @@ namespace NzbDrone.Core.Datastore.Migration.Framework reader.Read(); // ON index.TableName = ParseIdentifier(reader); - + // Find Column List reader.SkipTillToken(SqliteSyntaxReader.TokenType.ListStart); diff --git a/src/NzbDrone.Core/DecisionEngine/DownloadDecision.cs b/src/NzbDrone.Core/DecisionEngine/DownloadDecision.cs index 0d570806f..382c787bf 100644 --- a/src/NzbDrone.Core/DecisionEngine/DownloadDecision.cs +++ b/src/NzbDrone.Core/DecisionEngine/DownloadDecision.cs @@ -7,7 +7,7 @@ namespace NzbDrone.Core.DecisionEngine public class DownloadDecision { public RemoteMovie RemoteMovie { get; private set; } - + public IEnumerable Rejections { get; private set; } public bool Approved => !Rejections.Any(); @@ -33,7 +33,7 @@ namespace NzbDrone.Core.DecisionEngine RemoteMovie = movie; Rejections = rejections.ToList(); } - + public override string ToString() { if (Approved) diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/QualityAllowedByProfileSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/QualityAllowedByProfileSpecification.cs index 9da9b5c3c..2d8e048a5 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/QualityAllowedByProfileSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/QualityAllowedByProfileSpecification.cs @@ -19,7 +19,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications public virtual Decision IsSatisfiedBy(RemoteMovie subject, SearchCriteriaBase searchCriteria) { _logger.Debug("Checking if report meets quality requirements. {0}", subject.ParsedMovieInfo.Quality); - + var profile = subject.Movie.Profile.Value; var qualityIndex = profile.GetIndex(subject.ParsedMovieInfo.Quality.Quality); var qualityOrGroup = profile.Items[qualityIndex.Index]; diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs index 13a8f01e6..77ea89651 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/DelaySpecification.cs @@ -42,7 +42,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync var delay = delayProfile.GetProtocolDelay(subject.Release.DownloadProtocol); var isPreferredProtocol = subject.Release.DownloadProtocol == delayProfile.PreferredProtocol; - // Preferred word count + // Preferred word count var title = subject.Release.Title; var preferredWords = subject.Movie.Profile?.Value?.PreferredTags; var preferredCount = 0; @@ -79,7 +79,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync return Decision.Accept(); } } - + } // If quality meets or exceeds the best allowed quality in the profile accept it immediately @@ -92,7 +92,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync return Decision.Accept(); } - + var oldest = _pendingReleaseService.OldestPendingRelease(subject.Movie.Id); if (oldest != null && oldest.Release.AgeMinutes > delay) diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs index bd45d41f3..09f451572 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs @@ -74,7 +74,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync return Decision.Reject("CDH is disabled and grab event in history is of equal or higher quality: {0}", mostRecent.Quality); } } - + return Decision.Accept(); } diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs index af9b5ce72..3cd8af9a6 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs @@ -50,7 +50,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync return Decision.Reject("Proper downloading is disabled"); } } - + return Decision.Accept(); } diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradeDiskSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradeDiskSpecification.cs index 636d005ca..b183f2426 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradeDiskSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradeDiskSpecification.cs @@ -32,7 +32,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications { return Decision.Reject("Quality for existing file on disk is of equal or higher preference: {0}", file.Quality); } - + return Decision.Accept(); } diff --git a/src/NzbDrone.Core/Download/Clients/Deluge/DelugeTorrent.cs b/src/NzbDrone.Core/Download/Clients/Deluge/DelugeTorrent.cs index 898c425b4..4c7315cc9 100644 --- a/src/NzbDrone.Core/Download/Clients/Deluge/DelugeTorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/Deluge/DelugeTorrent.cs @@ -16,9 +16,9 @@ namespace NzbDrone.Core.Download.Clients.Deluge // Other paths: What is the difference between 'move_completed_path' and 'move_on_completed_path'? /* - [JsonProperty(PropertyName = "move_completed_path")] + [JsonProperty(PropertyName = "move_completed_path")] public String DownloadPathMoveCompleted { get; set; } - [JsonProperty(PropertyName = "move_on_completed_path")] + [JsonProperty(PropertyName = "move_on_completed_path")] public String DownloadPathMoveOnCompleted { get; set; } */ diff --git a/src/NzbDrone.Core/Download/Clients/DownloadStation/DiskStationApiInfo.cs b/src/NzbDrone.Core/Download/Clients/DownloadStation/DiskStationApiInfo.cs index c2a6667ab..67d150a9b 100644 --- a/src/NzbDrone.Core/Download/Clients/DownloadStation/DiskStationApiInfo.cs +++ b/src/NzbDrone.Core/Download/Clients/DownloadStation/DiskStationApiInfo.cs @@ -1,7 +1,7 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation { public class DiskStationApiInfo - { + { private string _path; public int MaxVersion { get; set; } diff --git a/src/NzbDrone.Core/Download/Clients/DownloadStation/Proxies/FileStationProxy.cs b/src/NzbDrone.Core/Download/Clients/DownloadStation/Proxies/FileStationProxy.cs index 3a8a2925d..a07cc1b47 100644 --- a/src/NzbDrone.Core/Download/Clients/DownloadStation/Proxies/FileStationProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/DownloadStation/Proxies/FileStationProxy.cs @@ -20,7 +20,7 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation.Proxies : base(DiskStationApi.FileStationList, "SYNO.FileStation.List", httpClient, cacheManager, logger) { } - + public SharedFolderMapping GetSharedFolderMapping(string sharedFolder, DownloadStationSettings settings) { var info = GetInfoFileOrDirectory(sharedFolder, settings); diff --git a/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs b/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs index e08356ecc..e64144654 100644 --- a/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs +++ b/src/NzbDrone.Core/Download/Clients/Hadouken/Hadouken.cs @@ -167,7 +167,7 @@ namespace NzbDrone.Core.Download.Clients.Hadouken if (version < new Version("5.1")) { - return new ValidationFailure(string.Empty, "Old Hadouken client with unsupported API, need 5.1 or higher"); + return new ValidationFailure(string.Empty, "Old Hadouken client with unsupported API, need 5.1 or higher"); } } catch (DownloadClientAuthenticationException ex) diff --git a/src/NzbDrone.Core/Download/Clients/Hadouken/HadoukenProxy.cs b/src/NzbDrone.Core/Download/Clients/Hadouken/HadoukenProxy.cs index f91a525d7..6083851d5 100644 --- a/src/NzbDrone.Core/Download/Clients/Hadouken/HadoukenProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/Hadouken/HadoukenProxy.cs @@ -38,7 +38,7 @@ namespace NzbDrone.Core.Download.Clients.Hadouken public HadoukenTorrent[] GetTorrents(HadoukenSettings settings) { var result = ProcessRequest(settings, "webui.list"); - + return GetTorrents(result.Torrents); } diff --git a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexProxy.cs b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexProxy.cs index c5e8ef4c7..7c78559ef 100644 --- a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexProxy.cs @@ -42,12 +42,12 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex var requestBuilder = BuildRequest(settings).Resource("nzb/add") .Post() .AddQueryParam("priority", priority.ToString()); - + if (settings.TvCategory.IsNotNullOrWhiteSpace()) { requestBuilder.AddQueryParam("groupname", settings.TvCategory); } - + requestBuilder.AddFormUpload("name", filename, nzbData, "application/x-nzb"); var response = ProcessRequest(requestBuilder, true, settings); @@ -91,7 +91,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex public List GetQueue(int doneLimit, NzbVortexSettings settings) { var requestBuilder = BuildRequest(settings).Resource("nzb"); - + if (settings.TvCategory.IsNotNullOrWhiteSpace()) { @@ -113,7 +113,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex return response.Files; } - + private HttpRequestBuilder BuildRequest(NzbVortexSettings settings) { var baseUrl = HttpRequestBuilder.BuildBaseUrl(true, settings.Host, settings.Port, settings.UrlBase); diff --git a/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetSettings.cs b/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetSettings.cs index 507c030d6..a785d48c5 100644 --- a/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetSettings.cs @@ -52,7 +52,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget public string Password { get; set; } [FieldDefinition(5, Label = "Category", Type = FieldType.Textbox, HelpText = "Adding a category specific to Radarr avoids conflicts with unrelated downloads, but it's optional")] - public string MovieCategory { get; set; } + public string MovieCategory { get; set; } [FieldDefinition(6, Label = "Recent Priority", Type = FieldType.Select, SelectOptions = typeof(NzbgetPriority), HelpText = "Priority to use when grabbing movies that released within the last 21 days")] public int RecentMoviePriority { get; set; } diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs index 0bde61ce0..0f1777b88 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs @@ -48,7 +48,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent public QBittorrentProxySelector(QBittorrentProxyV1 proxyV1, QBittorrentProxyV2 proxyV2, - IHttpClient httpClient, + IHttpClient httpClient, ICacheManager cacheManager, Logger logger) { @@ -69,7 +69,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent _proxyCache.Remove(proxyKey); } - return _proxyCache.Get(proxyKey, () => FetchProxy(settings), TimeSpan.FromMinutes(10.0)); + return _proxyCache.Get(proxyKey, () => FetchProxy(settings), TimeSpan.FromMinutes(10.0)); } private IQBittorrentProxy FetchProxy(QBittorrentSettings settings) diff --git a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs index bdaca6ad1..15d8df5dc 100644 --- a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs +++ b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs @@ -114,7 +114,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission { var isStopped = torrent.Status == TransmissionTorrentStatus.Stopped; var isSeeding = torrent.Status == TransmissionTorrentStatus.Seeding; - + if (torrent.SeedRatioMode == 1) { if (isStopped && ratio.HasValue && ratio >= torrent.SeedRatioLimit) diff --git a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentTorrent.cs b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentTorrent.cs index 9a6a0188f..30f4c33a8 100644 --- a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentTorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentTorrent.cs @@ -82,7 +82,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent if (reader.TokenType != JsonToken.EndArray) { result.DownloadUrl = (string)reader.Value; - + reader.Read(); result.RssFeedUrl = reader.Value; reader.Read(); @@ -100,7 +100,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent result.Unknown27 = reader.Value; reader.Read(); result.Unknown28 = reader.Value; - + while(reader.TokenType != JsonToken.EndArray) reader.Read(); } diff --git a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentTorrentCache.cs b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentTorrentCache.cs index 7f56675fe..4d9424f39 100644 --- a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentTorrentCache.cs +++ b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentTorrentCache.cs @@ -5,7 +5,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent public class UTorrentTorrentCache { public string CacheID { get; set; } - + public List Torrents { get; set; } } } diff --git a/src/NzbDrone.Core/Download/DownloadClientBase.cs b/src/NzbDrone.Core/Download/DownloadClientBase.cs index c8975aea3..051a97b51 100644 --- a/src/NzbDrone.Core/Download/DownloadClientBase.cs +++ b/src/NzbDrone.Core/Download/DownloadClientBase.cs @@ -40,7 +40,7 @@ namespace NzbDrone.Core.Download protected DownloadClientBase(IConfigService configService, INamingConfigService namingConfigService, - IDiskProvider diskProvider, + IDiskProvider diskProvider, IRemotePathMappingService remotePathMappingService, Logger logger) { diff --git a/src/NzbDrone.Core/Download/DownloadEventHub.cs b/src/NzbDrone.Core/Download/DownloadEventHub.cs index 8d0f50bc1..8b235c9b7 100644 --- a/src/NzbDrone.Core/Download/DownloadEventHub.cs +++ b/src/NzbDrone.Core/Download/DownloadEventHub.cs @@ -45,7 +45,7 @@ namespace NzbDrone.Core.Download else { MarkItemAsImported(message.TrackedDownload); - } + } } public void Handle(DownloadFailedEvent message) diff --git a/src/NzbDrone.Core/Download/DownloadFailedEvent.cs b/src/NzbDrone.Core/Download/DownloadFailedEvent.cs index 8106c056e..6af3aed51 100644 --- a/src/NzbDrone.Core/Download/DownloadFailedEvent.cs +++ b/src/NzbDrone.Core/Download/DownloadFailedEvent.cs @@ -12,7 +12,7 @@ namespace NzbDrone.Core.Download { Data = new Dictionary(); } - + public int MovieId { get; set; } public QualityModel Quality { get; set; } public string SourceTitle { get; set; } diff --git a/src/NzbDrone.Core/Download/FailedDownloadService.cs b/src/NzbDrone.Core/Download/FailedDownloadService.cs index d1561d021..b983cdde7 100644 --- a/src/NzbDrone.Core/Download/FailedDownloadService.cs +++ b/src/NzbDrone.Core/Download/FailedDownloadService.cs @@ -75,7 +75,7 @@ namespace NzbDrone.Core.Download trackedDownload.Warn("Download wasn't grabbed by Radarr, skipping"); return; } - + trackedDownload.State = TrackedDownloadStage.DownloadFailed; PublishDownloadFailedEvent(grabbedItems, failure, trackedDownload); } diff --git a/src/NzbDrone.Core/Download/IDownloadClient.cs b/src/NzbDrone.Core/Download/IDownloadClient.cs index a4897b59b..168e22fe0 100644 --- a/src/NzbDrone.Core/Download/IDownloadClient.cs +++ b/src/NzbDrone.Core/Download/IDownloadClient.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core.Download public interface IDownloadClient : IProvider { DownloadProtocol Protocol { get; } - + string Download(RemoteMovie remoteMovie); IEnumerable GetItems(); void RemoveItem(string downloadId, bool deleteData); diff --git a/src/NzbDrone.Core/Download/TorrentClientBase.cs b/src/NzbDrone.Core/Download/TorrentClientBase.cs index 078d8fd70..b5397ca33 100644 --- a/src/NzbDrone.Core/Download/TorrentClientBase.cs +++ b/src/NzbDrone.Core/Download/TorrentClientBase.cs @@ -38,7 +38,7 @@ namespace NzbDrone.Core.Download public override DownloadProtocol Protocol => DownloadProtocol.Torrent; public virtual bool PreferTorrentFile => false; - + protected abstract string AddFromMagnetLink(RemoteMovie remoteMovie, string hash, string magnetLink); protected abstract string AddFromTorrentFile(RemoteMovie remoteMovie, string hash, string filename, byte[] fileContent); diff --git a/src/NzbDrone.Core/Download/UsenetClientBase.cs b/src/NzbDrone.Core/Download/UsenetClientBase.cs index 601f3a47b..0a2a9541d 100644 --- a/src/NzbDrone.Core/Download/UsenetClientBase.cs +++ b/src/NzbDrone.Core/Download/UsenetClientBase.cs @@ -30,7 +30,7 @@ namespace NzbDrone.Core.Download _httpClient = httpClient; _nzbValidationService = nzbValidationService; } - + public override DownloadProtocol Protocol => DownloadProtocol.Usenet; protected abstract string AddFromNzbFile(RemoteMovie remoteMovie, string filename, byte[] fileContents); diff --git a/src/NzbDrone.Core/Extras/Files/ExtraFileManager.cs b/src/NzbDrone.Core/Extras/Files/ExtraFileManager.cs index 825238a16..24ee8e1df 100644 --- a/src/NzbDrone.Core/Extras/Files/ExtraFileManager.cs +++ b/src/NzbDrone.Core/Extras/Files/ExtraFileManager.cs @@ -88,7 +88,7 @@ namespace NzbDrone.Core.Extras.Files { filenameBuilder.Append(fileNameSuffix); } - + filenameBuilder.Append(extraFile.Extension); var existingFileName = Path.Combine(movie.Path, extraFile.RelativePath); diff --git a/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadataSettings.cs b/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadataSettings.cs index 238125817..ea4c7c7a5 100644 --- a/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadataSettings.cs +++ b/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadataSettings.cs @@ -27,7 +27,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Roksbox [FieldDefinition(1, Label = "Movie Images", Type = FieldType.Checkbox)] public bool MovieImages { get; set; } - + public bool IsValid => true; public NzbDroneValidationResult Validate() diff --git a/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadataSettings.cs b/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadataSettings.cs index 2d5a354d6..ef82c3d0b 100644 --- a/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadataSettings.cs +++ b/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadataSettings.cs @@ -27,7 +27,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Wdtv [FieldDefinition(1, Label = "Movie Images", Type = FieldType.Checkbox)] public bool MovieImages { get; set; } - + public bool IsValid => true; public NzbDroneValidationResult Validate() diff --git a/src/NzbDrone.Core/Extras/Metadata/Consumers/Xbmc/XbmcMetadata.cs b/src/NzbDrone.Core/Extras/Metadata/Consumers/Xbmc/XbmcMetadata.cs index ac82b6df2..b688332a6 100644 --- a/src/NzbDrone.Core/Extras/Metadata/Consumers/Xbmc/XbmcMetadata.cs +++ b/src/NzbDrone.Core/Extras/Metadata/Consumers/Xbmc/XbmcMetadata.cs @@ -169,7 +169,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Xbmc } foreach (var poster in posters) - { + { if (poster != null && poster.Url != null) { details.Add(new XElement("thumb", new XAttribute("aspect", "poster"), poster.Url)); diff --git a/src/NzbDrone.Core/Extras/Metadata/MetadataBase.cs b/src/NzbDrone.Core/Extras/Metadata/MetadataBase.cs index 55552e664..7358d7f5a 100644 --- a/src/NzbDrone.Core/Extras/Metadata/MetadataBase.cs +++ b/src/NzbDrone.Core/Extras/Metadata/MetadataBase.cs @@ -36,7 +36,7 @@ namespace NzbDrone.Core.Extras.Metadata } public abstract MetadataFile FindMetadataFile(Movie movie, string path); - + public abstract MetadataFileResult MovieMetadata(Movie movie, MovieFile movieFile); public abstract List MovieImages(Movie movie); diff --git a/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs b/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs index 52cd1d6e6..5566a18c9 100644 --- a/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs +++ b/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs @@ -316,7 +316,7 @@ namespace NzbDrone.Core.Extras.Metadata _metadataFileService.Delete(file.Id); } - + return matchingMetadataFiles.First(); } } diff --git a/src/NzbDrone.Core/Extras/Others/OtherExtraService.cs b/src/NzbDrone.Core/Extras/Others/OtherExtraService.cs index f586a4e41..5570a36f5 100644 --- a/src/NzbDrone.Core/Extras/Others/OtherExtraService.cs +++ b/src/NzbDrone.Core/Extras/Others/OtherExtraService.cs @@ -42,7 +42,7 @@ namespace NzbDrone.Core.Extras.Others } public override IEnumerable MoveFilesAfterRename(Movie movie, List movieFiles) - { + { var extraFiles = _otherExtraFileService.GetFilesByMovie(movie.Id); var movedFiles = new List(); diff --git a/src/NzbDrone.Core/HealthCheck/Checks/PTPOldSettingsCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/PTPOldSettingsCheck.cs index d908f32ae..70c99532b 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/PTPOldSettingsCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/PTPOldSettingsCheck.cs @@ -8,12 +8,12 @@ namespace NzbDrone.Core.HealthCheck.Checks public class PTPOldSettingsCheck : HealthCheckBase { private readonly IIndexerFactory _indexerFactory; - + public PTPOldSettingsCheck(IIndexerFactory indexerFactory) { _indexerFactory = indexerFactory; } - + public override HealthCheck Check() { var ptpIndexers = _indexerFactory.All().Where(i => i.Settings.GetType() == typeof(PassThePopcornSettings)); @@ -25,7 +25,7 @@ namespace NzbDrone.Core.HealthCheck.Checks { return new HealthCheck(GetType(), HealthCheckResult.Warning, $"The following PassThePopcorn indexers have deprecated settings and should be updated: {string.Join(",", ptpIndexerOldSettings)}"); } - + return new HealthCheck(GetType()); } } diff --git a/src/NzbDrone.Core/HealthCheck/HealthCheckFailedEvent.cs b/src/NzbDrone.Core/HealthCheck/HealthCheckFailedEvent.cs index 82a019ac1..1fc2af1a9 100644 --- a/src/NzbDrone.Core/HealthCheck/HealthCheckFailedEvent.cs +++ b/src/NzbDrone.Core/HealthCheck/HealthCheckFailedEvent.cs @@ -11,4 +11,4 @@ namespace NzbDrone.Core.HealthCheck HealthCheck = healthCheck; } } -} +} diff --git a/src/NzbDrone.Core/HealthCheck/HealthCheckService.cs b/src/NzbDrone.Core/HealthCheck/HealthCheckService.cs index b505ea090..643863c2b 100644 --- a/src/NzbDrone.Core/HealthCheck/HealthCheckService.cs +++ b/src/NzbDrone.Core/HealthCheck/HealthCheckService.cs @@ -80,7 +80,7 @@ namespace NzbDrone.Core.HealthCheck { _eventAggregator.PublishEvent(new HealthCheckFailedEvent(result)); } - + _healthCheckResults.Set(result.Source.Name, result); } } diff --git a/src/NzbDrone.Core/Http/HttpProxySettingsProvider.cs b/src/NzbDrone.Core/Http/HttpProxySettingsProvider.cs index 6e5a23e07..26c7d9341 100644 --- a/src/NzbDrone.Core/Http/HttpProxySettingsProvider.cs +++ b/src/NzbDrone.Core/Http/HttpProxySettingsProvider.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Core.Http { return null; } - + var proxySettings = new HttpProxySettings(_configService.ProxyType, _configService.ProxyHostname, _configService.ProxyPort, diff --git a/src/NzbDrone.Core/Indexers/AwesomeHD/AwesomeHDSettings.cs b/src/NzbDrone.Core/Indexers/AwesomeHD/AwesomeHDSettings.cs index 1866da2db..534bb4a10 100644 --- a/src/NzbDrone.Core/Indexers/AwesomeHD/AwesomeHDSettings.cs +++ b/src/NzbDrone.Core/Indexers/AwesomeHD/AwesomeHDSettings.cs @@ -30,7 +30,7 @@ namespace NzbDrone.Core.Indexers.AwesomeHD [FieldDefinition(0, Label = "API URL", Advanced = true, HelpText = "Do not change this unless you know what you're doing. Since you Passkey will be sent to that host.")] public string BaseUrl { get; set; } - + // [FieldDefinition(1, Type = FieldType.Tag, SelectOptions = typeof(Language), Label = "Multi Languages", HelpText = "What languages are normally in a multi release on this indexer?", Advanced = true)] public IEnumerable MultiLanguages { get; set; } diff --git a/src/NzbDrone.Core/Indexers/HDBits/HDBitsRequestGenerator.cs b/src/NzbDrone.Core/Indexers/HDBits/HDBitsRequestGenerator.cs index 6d100bfa0..71ff7ade9 100644 --- a/src/NzbDrone.Core/Indexers/HDBits/HDBitsRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/HDBits/HDBitsRequestGenerator.cs @@ -45,7 +45,7 @@ namespace NzbDrone.Core.Indexers.HDBits } return false; } - + public Func> GetCookies { get; set; } public Action, DateTime?> CookiesUpdater { get; set; } diff --git a/src/NzbDrone.Core/Indexers/HDBits/HDBitsSettings.cs b/src/NzbDrone.Core/Indexers/HDBits/HDBitsSettings.cs index 7a5a9df5f..be003121f 100644 --- a/src/NzbDrone.Core/Indexers/HDBits/HDBitsSettings.cs +++ b/src/NzbDrone.Core/Indexers/HDBits/HDBitsSettings.cs @@ -34,7 +34,7 @@ namespace NzbDrone.Core.Indexers.HDBits [FieldDefinition(0, Label = "Username")] public string Username { get; set; } - + //[FieldDefinition(1, Type = FieldType.Tag, SelectOptions = typeof(Language), Label = "Multi Languages", HelpText = "What languages are normally in a multi release on this indexer?", Advanced = true)] public IEnumerable MultiLanguages { get; set; } diff --git a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs index d8d580b8d..71fc0b4c3 100644 --- a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs @@ -61,7 +61,7 @@ namespace NzbDrone.Core.Indexers protected IndexerPageableRequestChain GetRequestChain(SearchCriteriaBase searchCriteria = null) { var generator = GetRequestGenerator(); - + //A func ensures cookies are always updated to the latest. This way, the first page could update the cookies and then can be reused by the second page. generator.GetCookies = () => @@ -75,7 +75,7 @@ namespace NzbDrone.Core.Indexers return cookies; }; - + var requests = searchCriteria == null ? generator.GetRecentRequests() : generator.GetSearchRequests(searchCriteria as MovieSearchCriteria); generator.CookiesUpdater = (cookies, expiration) => diff --git a/src/NzbDrone.Core/Indexers/IIndexerSettings.cs b/src/NzbDrone.Core/Indexers/IIndexerSettings.cs index 32a246392..ab76c2ffd 100644 --- a/src/NzbDrone.Core/Indexers/IIndexerSettings.cs +++ b/src/NzbDrone.Core/Indexers/IIndexerSettings.cs @@ -6,7 +6,7 @@ namespace NzbDrone.Core.Indexers public interface IIndexerSettings : IProviderConfig { string BaseUrl { get; set; } - // TODO: Need to Create UI field for this and turn functionality back on per indexer. + // TODO: Need to Create UI field for this and turn functionality back on per indexer. IEnumerable MultiLanguages { get; set; } } } diff --git a/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsRequestGenerator.cs b/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsRequestGenerator.cs index 264ea5ab5..fbc810067 100644 --- a/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsRequestGenerator.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core.Indexers.IPTorrents public class IPTorrentsRequestGenerator : IIndexerRequestGenerator { public IPTorrentsSettings Settings { get; set; } - + public virtual IndexerPageableRequestChain GetRecentRequests() { var pageableRequests = new IndexerPageableRequestChain(); @@ -17,7 +17,7 @@ namespace NzbDrone.Core.Indexers.IPTorrents return pageableRequests; } - + public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) { return new IndexerPageableRequestChain(); @@ -27,7 +27,7 @@ namespace NzbDrone.Core.Indexers.IPTorrents { yield return new IndexerRequest(Settings.BaseUrl, HttpAccept.Rss); } - + public Func> GetCookies { get; set; } public Action, DateTime?> CookiesUpdater { get; set; } } diff --git a/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsSettings.cs b/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsSettings.cs index ea2e84332..612393fac 100644 --- a/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsSettings.cs +++ b/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsSettings.cs @@ -37,7 +37,7 @@ namespace NzbDrone.Core.Indexers.IPTorrents [FieldDefinition(0, Label = "Feed URL", HelpText = "The full RSS feed url generated by IPTorrents, using only the categories you selected (HD, SD, x264, etc ...)")] public string BaseUrl { get; set; } - + // [FieldDefinition(1, Type = FieldType.Tag, SelectOptions = typeof(Language), Label = "Multi Languages", HelpText = "What languages are normally in a multi release on this indexer?", Advanced = true)] public IEnumerable MultiLanguages { get; set; } diff --git a/src/NzbDrone.Core/Indexers/IndexerStatus.cs b/src/NzbDrone.Core/Indexers/IndexerStatus.cs index 8233fa0e0..a556036cb 100644 --- a/src/NzbDrone.Core/Indexers/IndexerStatus.cs +++ b/src/NzbDrone.Core/Indexers/IndexerStatus.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core.Indexers public class IndexerStatus : ProviderStatusBase { public ReleaseInfo LastRssSyncReleaseInfo { get; set; } - + public IDictionary Cookies { get; set; } public DateTime? CookiesExpirationDate { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs index 4245b8551..2d06d7098 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs @@ -112,7 +112,7 @@ namespace NzbDrone.Core.Indexers.Newznab if (category.Subcategories != null) l.AddRange(CategoryIds(category.Subcategories)); } - + return l; } @@ -123,7 +123,7 @@ namespace NzbDrone.Core.Indexers.Newznab var capabilities = _capabilitiesProvider.GetCapabilities(Settings); var notSupported = Settings.Categories.Except(CategoryIds(capabilities.Categories)); - + if (notSupported.Any()) { _logger.Warn($"{Definition.Name} does not support the following categories: {string.Join(", ", notSupported)}. You should probably remove them."); diff --git a/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs index ba7240077..255b30cea 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs @@ -113,7 +113,7 @@ namespace NzbDrone.Core.Indexers.Newznab } } } - + public Func> GetCookies { get; set; } public Action, DateTime?> CookiesUpdater { get; set; } } diff --git a/src/NzbDrone.Core/Indexers/Nyaa/NyaaRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Nyaa/NyaaRequestGenerator.cs index 33bd7ba46..364be6240 100644 --- a/src/NzbDrone.Core/Indexers/Nyaa/NyaaRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Nyaa/NyaaRequestGenerator.cs @@ -60,7 +60,7 @@ namespace NzbDrone.Core.Indexers.Nyaa { return new IndexerPageableRequestChain(); } - + public Func> GetCookies { get; set; } public Action, DateTime?> CookiesUpdater { get; set; } } diff --git a/src/NzbDrone.Core/Indexers/Nyaa/NyaaSettings.cs b/src/NzbDrone.Core/Indexers/Nyaa/NyaaSettings.cs index 04279695e..8a650f7e6 100644 --- a/src/NzbDrone.Core/Indexers/Nyaa/NyaaSettings.cs +++ b/src/NzbDrone.Core/Indexers/Nyaa/NyaaSettings.cs @@ -32,7 +32,7 @@ namespace NzbDrone.Core.Indexers.Nyaa [FieldDefinition(0, Label = "Website URL")] public string BaseUrl { get; set; } - + // [FieldDefinition(1, Type = FieldType.Tag, SelectOptions = typeof(Language), Label = "Multi Languages", HelpText = "What languages are normally in a multi release on this indexer?", Advanced = true)] public IEnumerable MultiLanguages { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsRequestGenerator.cs index 195ecf0a8..410b08992 100644 --- a/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsRequestGenerator.cs @@ -46,10 +46,10 @@ namespace NzbDrone.Core.Indexers.Omgwtfnzbs pageableRequests.Add(GetPagedRequests(string.Format("{0}", searchCriteria.Movie.Title))); - + return pageableRequests; } - + public Func> GetCookies { get; set; } public Action, DateTime?> CookiesUpdater { get; set; } } diff --git a/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsSettings.cs b/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsSettings.cs index 859cbea0e..fbb4404f3 100644 --- a/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsSettings.cs +++ b/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsSettings.cs @@ -36,7 +36,7 @@ namespace NzbDrone.Core.Indexers.Omgwtfnzbs [FieldDefinition(2, Label = "Delay", HelpText = "Time in minutes to delay new nzbs before they appear on the RSS feed", Advanced = true)] public int Delay { get; set; } - + // [FieldDefinition(3, Type = FieldType.Tag, SelectOptions = typeof(Language), Label = "Multi Languages", HelpText = "What languages are normally in a multi release on this indexer?", Advanced = true)] public IEnumerable MultiLanguages { get; set; } diff --git a/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornRequestGenerator.cs b/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornRequestGenerator.cs index df61e205d..8a19112c1 100644 --- a/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornRequestGenerator.cs @@ -52,7 +52,7 @@ namespace NzbDrone.Core.Indexers.PassThePopcorn { request.HttpRequest.Cookies[cookie.Key] = cookie.Value; } - + CookiesUpdater(Cookies, DateTime.Now + TimeSpan.FromDays(30)); } diff --git a/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornSettings.cs b/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornSettings.cs index 10996332a..bf92a4066 100644 --- a/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornSettings.cs +++ b/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornSettings.cs @@ -34,10 +34,10 @@ namespace NzbDrone.Core.Indexers.PassThePopcorn [FieldDefinition(1, Label = "APIUser", HelpText = "These settings are found in your PassThePopcorn security settings (Edit Profile > Security).")] public string APIUser { get; set; } - + [FieldDefinition(2, Label = "APIKey", Type = FieldType.Password)] public string APIKey { get; set; } - + // [FieldDefinition(3, Type = FieldType.Tag, SelectOptions = typeof(Language), Label = "Multi Languages", HelpText = "What languages are normally in a multi release on this indexer?", Advanced = true)] public IEnumerable MultiLanguages { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Rarbg/Rarbg.cs b/src/NzbDrone.Core/Indexers/Rarbg/Rarbg.cs index cebc6fa04..632ec43f7 100644 --- a/src/NzbDrone.Core/Indexers/Rarbg/Rarbg.cs +++ b/src/NzbDrone.Core/Indexers/Rarbg/Rarbg.cs @@ -62,7 +62,7 @@ namespace NzbDrone.Core.Indexers.Rarbg siteKey = ex.CaptchaRequest.SiteKey, secretToken = ex.CaptchaRequest.SecretToken, responseUrl = ex.CaptchaRequest.ResponseUrl.FullUri, - } + } }; } diff --git a/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs index 79e750c28..0314a2115 100644 --- a/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs @@ -95,7 +95,7 @@ namespace NzbDrone.Core.Indexers.Rarbg { requestBuilder.AddQueryParam("search_string", $"{searchCriteria.Movie.Title} {searchCriteria.Movie.Year}"); } - + if (!Settings.RankedOnly) { @@ -112,7 +112,7 @@ namespace NzbDrone.Core.Indexers.Rarbg yield return new IndexerRequest(requestBuilder.Build()); } - + public Func> GetCookies { get; set; } public Action, DateTime?> CookiesUpdater { get; set; } } diff --git a/src/NzbDrone.Core/Indexers/Rarbg/RarbgSettings.cs b/src/NzbDrone.Core/Indexers/Rarbg/RarbgSettings.cs index e7ab4559f..f47feefe4 100644 --- a/src/NzbDrone.Core/Indexers/Rarbg/RarbgSettings.cs +++ b/src/NzbDrone.Core/Indexers/Rarbg/RarbgSettings.cs @@ -39,7 +39,7 @@ namespace NzbDrone.Core.Indexers.Rarbg [FieldDefinition(2, Type = FieldType.Captcha, Label = "CAPTCHA Token", HelpText = "CAPTCHA Clearance token used to handle CloudFlare Anti-DDOS measures on shared-ip VPNs.")] public string CaptchaToken { get; set; } - + // [FieldDefinition(3, Type = FieldType.Tag, SelectOptions = typeof(Language), Label = "Multi Languages", HelpText = "What languages are normally in a multi release on this indexer?", Advanced = true)] public IEnumerable MultiLanguages { get; set; } diff --git a/src/NzbDrone.Core/Indexers/RssIndexerRequestGenerator.cs b/src/NzbDrone.Core/Indexers/RssIndexerRequestGenerator.cs index 328bc49b2..87788e366 100644 --- a/src/NzbDrone.Core/Indexers/RssIndexerRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/RssIndexerRequestGenerator.cs @@ -28,7 +28,7 @@ namespace NzbDrone.Core.Indexers { return new IndexerPageableRequestChain(); } - + public Func> GetCookies { get; set; } public Action, DateTime?> CookiesUpdater { get; set; } } diff --git a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotato.cs b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotato.cs index 806b3f686..fb3f9b4e0 100644 --- a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotato.cs +++ b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotato.cs @@ -45,6 +45,6 @@ namespace NzbDrone.Core.Indexers.TorrentPotato return new TorrentPotatoParser(); } - + } } diff --git a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoParser.cs b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoParser.cs index c9cf7f7df..14aeb132c 100644 --- a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoParser.cs +++ b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoParser.cs @@ -41,7 +41,7 @@ namespace NzbDrone.Core.Indexers.TorrentPotato torrentInfo.Seeders = torrent.seeders; torrentInfo.Peers = torrent.leechers + torrent.seeders; torrentInfo.Freeleech = torrent.freeleech; - + results.Add(torrentInfo); } diff --git a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoRequestGenerator.cs b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoRequestGenerator.cs index 3d8a73f7b..d404516b6 100644 --- a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoRequestGenerator.cs @@ -79,7 +79,7 @@ namespace NzbDrone.Core.Indexers.TorrentPotato pageableRequests.Add(GetMovieRequest(searchCriteria)); return pageableRequests; } - + public Func> GetCookies { get; set; } public Action, DateTime?> CookiesUpdater { get; set; } } diff --git a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs index dfade6bdd..dded701fd 100644 --- a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs +++ b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs @@ -29,13 +29,13 @@ namespace NzbDrone.Core.Indexers.TorrentPotato [FieldDefinition(0, Label = "API URL", HelpText = "URL to TorrentPotato api.")] public string BaseUrl { get; set; } - + [FieldDefinition(1, Label = "Username", HelpText = "The username you use at your indexer.")] public string User { get; set; } [FieldDefinition(2, Label = "Passkey", HelpText = "The password you use at your Indexer.")] public string Passkey { get; set; } - + // [FieldDefinition(3, Type = FieldType.Tag, SelectOptions = typeof(Language), Label = "Multi Languages", HelpText = "What languages are normally in a multi release on this indexer?", Advanced = true)] public IEnumerable MultiLanguages { get; set; } diff --git a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerRequestGenerator.cs b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerRequestGenerator.cs index 4de64aa34..fbdad0635 100644 --- a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerRequestGenerator.cs @@ -9,7 +9,7 @@ namespace NzbDrone.Core.Indexers.TorrentRss public class TorrentRssIndexerRequestGenerator : IIndexerRequestGenerator { public TorrentRssIndexerSettings Settings { get; set; } - + public virtual IndexerPageableRequestChain GetRecentRequests() { var pageableRequests = new IndexerPageableRequestChain(); @@ -38,7 +38,7 @@ namespace NzbDrone.Core.Indexers.TorrentRss yield return request; } - + public Func> GetCookies { get; set; } public Action, DateTime?> CookiesUpdater { get; set; } } diff --git a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerSettings.cs b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerSettings.cs index 089e33b34..4c1dc64f0 100644 --- a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerSettings.cs +++ b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerSettings.cs @@ -36,7 +36,7 @@ namespace NzbDrone.Core.Indexers.TorrentRss [FieldDefinition(2, Type = FieldType.Checkbox, Label = "Allow Zero Size", HelpText="Enabling this will allow you to use feeds that don't specify release size, but be careful, size related checks will not be performed.")] public bool AllowZeroSize { get; set; } - + // [FieldDefinition(3, Type = FieldType.Tag, SelectOptions = typeof(Language), Label = "Multi Languages", HelpText = "What languages are normally in a multi release on this indexer?", Advanced = true)] public IEnumerable MultiLanguages { get; set; } diff --git a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssParserFactory.cs b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssParserFactory.cs index a60e3cd9c..d7b58cda7 100644 --- a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssParserFactory.cs +++ b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssParserFactory.cs @@ -14,7 +14,7 @@ namespace NzbDrone.Core.Indexers.TorrentRss public class TorrentRssParserFactory : ITorrentRssParserFactory { protected readonly Logger _logger; - + private readonly ICached _settingsCache; private readonly ITorrentRssSettingsDetector _torrentRssSettingsDetector; diff --git a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs index 3b835134c..6c85e4758 100644 --- a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs +++ b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs @@ -139,7 +139,7 @@ namespace NzbDrone.Core.Indexers.TorrentRss _logger.Trace("Feed doesn't have Seeders in Description, disabling option."); parser.ParseSeedersInDescription = settings.ParseSeedersInDescription = false; } - + if (!releases.Any(r => r.Size < ValidSizeThreshold)) { _logger.Trace("Feed has valid size in enclosure."); diff --git a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs index bb5991781..0f1f01a21 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs @@ -100,7 +100,7 @@ namespace NzbDrone.Core.Indexers.Torznab if (category.Subcategories != null) l.AddRange(CategoryIds(category.Subcategories)); } - + return l; } @@ -111,7 +111,7 @@ namespace NzbDrone.Core.Indexers.Torznab var capabilities = _capabilitiesProvider.GetCapabilities(Settings); var notSupported = Settings.Categories.Except(CategoryIds(capabilities.Categories)); - + if (notSupported.Any()) { _logger.Warn($"{Definition.Name} does not support the following categories: {string.Join(", ", notSupported)}. You should probably remove them."); diff --git a/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs b/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs index b7cd2721b..60099bccf 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs @@ -60,7 +60,7 @@ namespace NzbDrone.Core.Indexers.Torznab [FieldDefinition(8, Type = FieldType.Number, Label = "Minimum Seeders", HelpText = "Minimum number of seeders required.", Advanced = true)] public int MinimumSeeders { get; set; } - + [FieldDefinition(9)] public SeedCriteriaSettings SeedCriteria { get; } = new SeedCriteriaSettings(); diff --git a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs index d39d788da..e95095f17 100644 --- a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs +++ b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs @@ -98,7 +98,7 @@ namespace NzbDrone.Core.Instrumentation sqlCommand.Parameters.Add(new SQLiteParameter("ExceptionType", DbType.String) { Value = log.ExceptionType }); sqlCommand.Parameters.Add(new SQLiteParameter("Level", DbType.String) { Value = log.Level }); - sqlCommand.ExecuteNonQuery(); + sqlCommand.ExecuteNonQuery(); } } diff --git a/src/NzbDrone.Core/Jobs/TaskManager.cs b/src/NzbDrone.Core/Jobs/TaskManager.cs index 1d7495b39..e1981f4de 100644 --- a/src/NzbDrone.Core/Jobs/TaskManager.cs +++ b/src/NzbDrone.Core/Jobs/TaskManager.cs @@ -87,7 +87,7 @@ namespace NzbDrone.Core.Jobs }, new ScheduledTask - { + { Interval = GetRssSyncInterval(), TypeName = typeof(RssSyncCommand).FullName }, diff --git a/src/NzbDrone.Core/Languages/Language.cs b/src/NzbDrone.Core/Languages/Language.cs index 90a13e7b0..681935a68 100644 --- a/src/NzbDrone.Core/Languages/Language.cs +++ b/src/NzbDrone.Core/Languages/Language.cs @@ -83,7 +83,7 @@ namespace NzbDrone.Core.Languages public static Language Czech { get { return new Language(25, "Czech"); } } public static Language Any { get { return new Language(-1, "Any"); } } - + public static List All { get diff --git a/src/NzbDrone.Core/MediaCover/EnsureMediaCoversCommand.cs b/src/NzbDrone.Core/MediaCover/EnsureMediaCoversCommand.cs index 0cb4b02dd..2dac41668 100644 --- a/src/NzbDrone.Core/MediaCover/EnsureMediaCoversCommand.cs +++ b/src/NzbDrone.Core/MediaCover/EnsureMediaCoversCommand.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core.MediaCover public EnsureMediaCoversCommand() { - + } public EnsureMediaCoversCommand(int movieId) diff --git a/src/NzbDrone.Core/MediaCover/MediaCoverService.cs b/src/NzbDrone.Core/MediaCover/MediaCoverService.cs index 60ff480d0..9a33141b6 100644 --- a/src/NzbDrone.Core/MediaCover/MediaCoverService.cs +++ b/src/NzbDrone.Core/MediaCover/MediaCoverService.cs @@ -125,7 +125,7 @@ namespace NzbDrone.Core.MediaCover _logger.Warn(e, "Couldn't download media cover for {0}. {1}", movie, e.Message); if (retried < 3) { - retried += 1; + retried += 1; _logger.Warn("Retrying for the {0}. time in ten seconds.", retried); System.Threading.Thread.Sleep(10 * 1000); EnsureCovers(movie, retried); diff --git a/src/NzbDrone.Core/MediaFiles/Commands/UpdateMovieFileQualityCommand.cs b/src/NzbDrone.Core/MediaFiles/Commands/UpdateMovieFileQualityCommand.cs index 7d5cc43fd..678d39574 100644 --- a/src/NzbDrone.Core/MediaFiles/Commands/UpdateMovieFileQualityCommand.cs +++ b/src/NzbDrone.Core/MediaFiles/Commands/UpdateMovieFileQualityCommand.cs @@ -6,7 +6,7 @@ namespace NzbDrone.Core.MediaFiles.Commands public class UpdateMovieFileQualityCommand : Command { public IEnumerable MovieFileIds { get; set; } - + public override bool SendUpdatesToClient => true; public UpdateMovieFileQualityCommand(IEnumerable movieFileIds) diff --git a/src/NzbDrone.Core/MediaFiles/Events/MovieImportedEvent.cs b/src/NzbDrone.Core/MediaFiles/Events/MovieImportedEvent.cs index d6061d244..b16a71f01 100644 --- a/src/NzbDrone.Core/MediaFiles/Events/MovieImportedEvent.cs +++ b/src/NzbDrone.Core/MediaFiles/Events/MovieImportedEvent.cs @@ -9,7 +9,7 @@ namespace NzbDrone.Core.MediaFiles.Events public MovieFile ImportedMovie { get; private set; } public bool NewDownload { get; private set; } public string DownloadClient { get; private set; } - public string DownloadId { get; private set; } + public string DownloadId { get; private set; } public MovieImportedEvent(LocalMovie movieInfo, MovieFile importedMovie, bool newDownload) { diff --git a/src/NzbDrone.Core/MediaFiles/MediaInfo/MediaInfoFormatter.cs b/src/NzbDrone.Core/MediaFiles/MediaInfo/MediaInfoFormatter.cs index 216e72861..9167a27ed 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaInfo/MediaInfoFormatter.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaInfo/MediaInfoFormatter.cs @@ -48,7 +48,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo { return string.Empty; } - + if (audioFormat.ContainsIgnoreCase("Atmos")) { return "TrueHD Atmos"; diff --git a/src/NzbDrone.Core/MediaFiles/MovieImport/ImportDecisionMaker.cs b/src/NzbDrone.Core/MediaFiles/MovieImport/ImportDecisionMaker.cs index 76a8562bb..87bea36f9 100644 --- a/src/NzbDrone.Core/MediaFiles/MovieImport/ImportDecisionMaker.cs +++ b/src/NzbDrone.Core/MediaFiles/MovieImport/ImportDecisionMaker.cs @@ -103,7 +103,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport if (fileMovieInfo != null) { fileMovieInfo = _parsingService.EnhanceMovieInfo(fileMovieInfo); - } + } localMovie.FileMovieInfo = fileMovieInfo; localMovie.Size = _diskProvider.GetFileSize(localMovie.Path); diff --git a/src/NzbDrone.Core/MediaFiles/TorrentInfo/TorrentFileInfoReader.cs b/src/NzbDrone.Core/MediaFiles/TorrentInfo/TorrentFileInfoReader.cs index 879cd9ca2..996b4211a 100644 --- a/src/NzbDrone.Core/MediaFiles/TorrentInfo/TorrentFileInfoReader.cs +++ b/src/NzbDrone.Core/MediaFiles/TorrentInfo/TorrentFileInfoReader.cs @@ -2,7 +2,7 @@ namespace NzbDrone.Core.MediaFiles.TorrentInfo { - public interface ITorrentFileInfoReader + public interface ITorrentFileInfoReader { string GetHashFromTorrentFile(byte[] fileContents); } diff --git a/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs b/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs index e619122cf..b507229b4 100644 --- a/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs +++ b/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs @@ -129,7 +129,7 @@ namespace NzbDrone.Core.Messaging.Commands threadLimit = Math.Max(THREAD_LOWER_BOUND, threadLimit); threadLimit = Math.Min(THREAD_UPPER_BOUND, threadLimit); - + _logger.Info("Starting {} threads for tasks.", threadLimit); for (int i = 0; i < threadLimit + 1; i++) diff --git a/src/NzbDrone.Core/Messaging/Commands/CommandQueueManager.cs b/src/NzbDrone.Core/Messaging/Commands/CommandQueueManager.cs index c37e49335..6095d3b4e 100644 --- a/src/NzbDrone.Core/Messaging/Commands/CommandQueueManager.cs +++ b/src/NzbDrone.Core/Messaging/Commands/CommandQueueManager.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Core.Messaging.Commands IEnumerable Queue(CancellationToken cancellationToken); List All(); CommandModel Get(int id); - List GetStarted(); + List GetStarted(); void SetMessage(CommandModel command, string message); void Start(CommandModel command); void Complete(CommandModel command, string message); @@ -39,7 +39,7 @@ namespace NzbDrone.Core.Messaging.Commands private readonly CommandQueue _commandQueue; - public CommandQueueManager(ICommandRepository repo, + public CommandQueueManager(ICommandRepository repo, IServiceFactory serviceFactory, Logger logger) { @@ -183,7 +183,7 @@ namespace NzbDrone.Core.Messaging.Commands public void Fail(CommandModel command, string message, Exception e) { command.Exception = e.ToString(); - + Update(command, CommandStatus.Failed, message); } @@ -206,7 +206,7 @@ namespace NzbDrone.Core.Messaging.Commands public void CleanCommands() { _logger.Trace("Cleaning up old commands"); - + var commands = _commandQueue.All() .Where(c => c.EndedAt < DateTime.UtcNow.AddMinutes(-5)) .ToList(); diff --git a/src/NzbDrone.Core/MetadataSource/PreDB/PreDBService.cs b/src/NzbDrone.Core/MetadataSource/PreDB/PreDBService.cs index 6a3212c0a..9ffe1e4ee 100644 --- a/src/NzbDrone.Core/MetadataSource/PreDB/PreDBService.cs +++ b/src/NzbDrone.Core/MetadataSource/PreDB/PreDBService.cs @@ -131,7 +131,7 @@ namespace NzbDrone.Core.MetadataSource.PreDB return matches; } - + private List Sync() @@ -148,7 +148,7 @@ namespace NzbDrone.Core.MetadataSource.PreDB public void Execute(PreDBSyncCommand message) { var haveNewReleases = Sync(); - + foreach (Movie movie in haveNewReleases) { if (!movie.HasPreDBEntry) @@ -187,14 +187,14 @@ namespace NzbDrone.Core.MetadataSource.PreDB } } - return false; + return false; } catch (Exception ex) { _logger.Warn(ex, "Error while looking on predb.me."); return false; } - + } } } diff --git a/src/NzbDrone.Core/MetadataSource/RadarrAPI/RadarrAPIClient.cs b/src/NzbDrone.Core/MetadataSource/RadarrAPI/RadarrAPIClient.cs index 70b88f4f1..e4f95e6d2 100644 --- a/src/NzbDrone.Core/MetadataSource/RadarrAPI/RadarrAPIClient.cs +++ b/src/NzbDrone.Core/MetadataSource/RadarrAPI/RadarrAPIClient.cs @@ -119,7 +119,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI return titles; } - + public Tuple, AlternativeYear> AlternativeTitlesAndYearForMovie(int tmdbId) { var request = RadarrAPI.Create().SetSegment("route", "mappings").SetSegment("action", "find").AddQueryParam("tmdbid", tmdbId).Build(); @@ -145,7 +145,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI SourceId = year.Id }; } - + return new Tuple, AlternativeYear>(titles, newYear); } @@ -157,11 +157,11 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI .AddQueryParam("aka_title", title.Title).Build(); var newMapping = Execute(request); - + var newTitle = new AlternativeTitle(newMapping.Info.AkaTitle, SourceType.Mappings, newMapping.Id, title.Language); newTitle.VoteCount = newMapping.VoteCount; newTitle.Votes = newMapping.Votes; - + return newTitle; } @@ -179,7 +179,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI SourceId = newYear.Id }; } - + public IHttpRequestBuilderFactory RadarrAPI { get; private set; } } } diff --git a/src/NzbDrone.Core/MetadataSource/RadarrAPI/RadarrResources.cs b/src/NzbDrone.Core/MetadataSource/RadarrAPI/RadarrResources.cs index 0e071b055..f948ff489 100644 --- a/src/NzbDrone.Core/MetadataSource/RadarrAPI/RadarrResources.cs +++ b/src/NzbDrone.Core/MetadataSource/RadarrAPI/RadarrResources.cs @@ -44,7 +44,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI return $"Error while calling api: {firstError.Title}\nFull error(s): {details}"; } } - + public class TitleInfo { @@ -57,7 +57,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI [JsonProperty("aka_clean_title")] public string AkaCleanTitle { get; set; } } - + public class YearInfo { @@ -149,7 +149,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI [JsonProperty("mappings")] public Mappings Mappings { get; set; } } - + public class AddTitleMapping { @@ -177,7 +177,7 @@ namespace NzbDrone.Core.MetadataSource.RadarrAPI [JsonProperty("locked")] public bool Locked { get; set; } } - + public class AddYearMapping { diff --git a/src/NzbDrone.Core/MetadataSource/SearchMovieComparer.cs b/src/NzbDrone.Core/MetadataSource/SearchMovieComparer.cs index c5a6085c4..16a1a6bc7 100644 --- a/src/NzbDrone.Core/MetadataSource/SearchMovieComparer.cs +++ b/src/NzbDrone.Core/MetadataSource/SearchMovieComparer.cs @@ -20,7 +20,7 @@ namespace NzbDrone.Core.MetadataSource public SearchMovieComparer(string searchQuery) { SearchQuery = searchQuery; - + var match = Regex.Match(SearchQuery, @"^(?.+)\s+(?:\((?\d{4})\)|(?\d{4}))$"); if (match.Success) { @@ -56,10 +56,10 @@ namespace NzbDrone.Core.MetadataSource // Compare prefix matches by year "(CSI: ..." result = CompareWithYear(x, y, s => s.Title.ToLowerInvariant().StartsWith(_searchQueryWithoutYear + ":")); if (result != 0) return -result; - + return Compare(x, y, s => SearchQuery.LevenshteinDistanceClean(s.Title) - GetYearFactor(s)); } - + public int Compare(Movie x, Movie y, Func keySelector) where T : IComparable { diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs index 7e970e2e3..e471eaa6a 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs @@ -26,7 +26,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook { private readonly IHttpClient _httpClient; private readonly Logger _logger; - + private readonly IHttpRequestBuilderFactory _movieBuilder; private readonly ITmdbConfigService _configService; private readonly IMovieService _movieService; diff --git a/src/NzbDrone.Core/Movies/AlternativeTitles/AlternativeTitle.cs b/src/NzbDrone.Core/Movies/AlternativeTitles/AlternativeTitle.cs index 4d8de698d..6930bddf7 100644 --- a/src/NzbDrone.Core/Movies/AlternativeTitles/AlternativeTitle.cs +++ b/src/NzbDrone.Core/Movies/AlternativeTitles/AlternativeTitle.cs @@ -16,16 +16,16 @@ namespace NzbDrone.Core.Movies.AlternativeTitles public int VoteCount { get; set; } public Language Language { get; set; } public LazyLoaded Movie { get; set; } - - public AlternativeTitle() - { - - } - - public AlternativeTitle(string title, SourceType sourceType = SourceType.TMDB, int sourceId = 0, Language language = null) - { - Title = title; - CleanTitle = title.CleanSeriesTitle(); + + public AlternativeTitle() + { + + } + + public AlternativeTitle(string title, SourceType sourceType = SourceType.TMDB, int sourceId = 0, Language language = null) + { + Title = title; + CleanTitle = title.CleanSeriesTitle(); SourceType = sourceType; SourceId = sourceId; Language = language ?? Language.English; diff --git a/src/NzbDrone.Core/Movies/MovieRepository.cs b/src/NzbDrone.Core/Movies/MovieRepository.cs index 51e39c6a2..619d42b19 100644 --- a/src/NzbDrone.Core/Movies/MovieRepository.cs +++ b/src/NzbDrone.Core/Movies/MovieRepository.cs @@ -81,7 +81,7 @@ namespace NzbDrone.Core.Movies var query = Query.Where(m => (m.InCinemas >= start && m.InCinemas <= end) || (m.PhysicalRelease >= start && m.PhysicalRelease <= end)); - + if (!includeUnmonitored) { query.AndWhere(e => e.Monitored == true); @@ -178,7 +178,7 @@ namespace NzbDrone.Core.Movies } Movie result = Query.Where(s => s.CleanTitle == cleanTitle).FirstWithYear(year); - + if (result == null) { result = Query.Where(movie => movie.CleanTitle == cleanTitleWithArabicNumbers || movie.CleanTitle == cleanTitleWithRomanNumbers) diff --git a/src/NzbDrone.Core/Movies/RefreshMovieService.cs b/src/NzbDrone.Core/Movies/RefreshMovieService.cs index fb7b106e7..9498c60cc 100644 --- a/src/NzbDrone.Core/Movies/RefreshMovieService.cs +++ b/src/NzbDrone.Core/Movies/RefreshMovieService.cs @@ -111,7 +111,7 @@ namespace NzbDrone.Core.Movies mappingsTitles = mappingsTitles.Where(t => t.IsTrusted()).ToList(); movieInfo.AlternativeTitles.AddRange(mappingsTitles); - + movie.AlternativeTitles = _titleService.UpdateTitles(movieInfo.AlternativeTitles, movie); if (mappings.Item2 != null) diff --git a/src/NzbDrone.Core/NetImport/NetImportBase.cs b/src/NzbDrone.Core/NetImport/NetImportBase.cs index 918508e4f..2345d46aa 100644 --- a/src/NzbDrone.Core/NetImport/NetImportBase.cs +++ b/src/NzbDrone.Core/NetImport/NetImportBase.cs @@ -14,7 +14,7 @@ namespace NzbDrone.Core.NetImport public IList Movies { get; set; } public bool AnyFailure { get; set; } } - + public abstract class NetImportBase : INetImport where TSettings : IProviderConfig, new() { diff --git a/src/NzbDrone.Core/NetImport/NetImportFactory.cs b/src/NzbDrone.Core/NetImport/NetImportFactory.cs index d1b43d5ac..2d6b71f9c 100644 --- a/src/NzbDrone.Core/NetImport/NetImportFactory.cs +++ b/src/NzbDrone.Core/NetImport/NetImportFactory.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Core.NetImport public NetImportFactory(INetImportRepository providerRepository, IEnumerable providers, - IContainer container, + IContainer container, IEventAggregator eventAggregator, Logger logger) : base(providerRepository, providers, container, eventAggregator, logger) diff --git a/src/NzbDrone.Core/NetImport/NetImportRepository.cs b/src/NzbDrone.Core/NetImport/NetImportRepository.cs index 4ed1e613f..83ebded94 100644 --- a/src/NzbDrone.Core/NetImport/NetImportRepository.cs +++ b/src/NzbDrone.Core/NetImport/NetImportRepository.cs @@ -16,7 +16,7 @@ namespace NzbDrone.Core.NetImport : base(database, eventAggregator) { } - + public void UpdateSettings(NetImportDefinition model) { SetFields(model, m => m.Settings); diff --git a/src/NzbDrone.Core/NetImport/Radarr/RadarrParser.cs b/src/NzbDrone.Core/NetImport/Radarr/RadarrParser.cs index 005282b9f..8a4b99570 100644 --- a/src/NzbDrone.Core/NetImport/Radarr/RadarrParser.cs +++ b/src/NzbDrone.Core/NetImport/Radarr/RadarrParser.cs @@ -41,7 +41,7 @@ namespace NzbDrone.Core.NetImport.Radarr return jsonResponse.SelectList(_skyhookProxy.MapMovie); - + } protected virtual bool PreProcess(NetImportResponse indexerResponse) diff --git a/src/NzbDrone.Core/NetImport/Trakt/TraktImport.cs b/src/NzbDrone.Core/NetImport/Trakt/TraktImport.cs index 91ab39fc1..f161a2ab8 100644 --- a/src/NzbDrone.Core/NetImport/Trakt/TraktImport.cs +++ b/src/NzbDrone.Core/NetImport/Trakt/TraktImport.cs @@ -17,9 +17,9 @@ namespace NzbDrone.Core.NetImport.Trakt private INetImportRepository _netImportRepository; public TraktImport(INetImportRepository netImportRepository, - IHttpClient httpClient, - IConfigService configService, - IParsingService parsingService, + IHttpClient httpClient, + IConfigService configService, + IParsingService parsingService, Logger logger) : base(httpClient, configService, parsingService, logger) { diff --git a/src/NzbDrone.Core/Notifications/Email/EmailService.cs b/src/NzbDrone.Core/Notifications/Email/EmailService.cs index 84d1ed298..d0cdbc497 100644 --- a/src/NzbDrone.Core/Notifications/Email/EmailService.cs +++ b/src/NzbDrone.Core/Notifications/Email/EmailService.cs @@ -25,7 +25,7 @@ namespace NzbDrone.Core.Notifications.Email { var email = new MailMessage(); email.From = new MailAddress(settings.From); - + email.To.Add(settings.To); email.Subject = subject; diff --git a/src/NzbDrone.Core/Notifications/Join/Join.cs b/src/NzbDrone.Core/Notifications/Join/Join.cs index bbf362744..7b1c6b05f 100644 --- a/src/NzbDrone.Core/Notifications/Join/Join.cs +++ b/src/NzbDrone.Core/Notifications/Join/Join.cs @@ -31,7 +31,7 @@ namespace NzbDrone.Core.Notifications.Join { _proxy.SendNotification(HEALTH_ISSUE_TITLE_BRANDED, message.Message, Settings); } - + public override ValidationResult Test() { var failures = new List(); diff --git a/src/NzbDrone.Core/Notifications/Join/JoinProxy.cs b/src/NzbDrone.Core/Notifications/Join/JoinProxy.cs index 90e7f3e6b..2326fd5c6 100644 --- a/src/NzbDrone.Core/Notifications/Join/JoinProxy.cs +++ b/src/NzbDrone.Core/Notifications/Join/JoinProxy.cs @@ -88,7 +88,7 @@ namespace NzbDrone.Core.Notifications.Join { request.AddParameter("deviceId", "group.all"); } - + request.AddParameter("apikey", settings.ApiKey); request.AddParameter("title", title); request.AddParameter("text", message); @@ -115,7 +115,7 @@ namespace NzbDrone.Core.Notifications.Join throw new JoinInvalidDeviceException(res.errorMessage); } // Oddly enough, rather than give us an "Invalid API key", the Join API seems to assume the key is valid, - // but fails when doing a device lookup associated with that key. + // but fails when doing a device lookup associated with that key. // In our case we are using "deviceIds" rather than "deviceId" so when the singular form error shows up // we know the API key was the fault. else if (res.errorMessage.Equals("No device to send message to")) diff --git a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs index e17bbabbe..5042f9fc8 100644 --- a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs +++ b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs @@ -68,7 +68,7 @@ namespace NzbDrone.Core.Notifications.Emby { var scheme = settings.UseSsl ? "https" : "http"; var url = $@"{scheme}://{settings.Address}/mediabrowser"; - + return new HttpRequestBuilder(url).Resource(path).Build(); } diff --git a/src/NzbDrone.Core/Notifications/NotificationService.cs b/src/NzbDrone.Core/Notifications/NotificationService.cs index ee807e32b..99cedefc2 100644 --- a/src/NzbDrone.Core/Notifications/NotificationService.cs +++ b/src/NzbDrone.Core/Notifications/NotificationService.cs @@ -13,7 +13,7 @@ using NzbDrone.Core.Movies; namespace NzbDrone.Core.Notifications { public class NotificationService - : IHandle, + : IHandle, IHandle, IHandle, IHandle @@ -52,7 +52,7 @@ namespace NzbDrone.Core.Notifications _logger.Debug("No tags set for this notification."); return true; } - + if (definition.Tags.Intersect(movie.Tags).Any()) { _logger.Debug("Notification and movie have one or more intersecting tags."); diff --git a/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs b/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs index e2852c256..f0780642f 100644 --- a/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs +++ b/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs @@ -34,7 +34,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid public override void OnMovieRename(Movie movie) { } - + public override string Name => "Notify My Android"; public override ValidationResult Test() diff --git a/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerProxy.cs b/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerProxy.cs index 21345ec94..253a5ec65 100644 --- a/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerProxy.cs +++ b/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerProxy.cs @@ -212,7 +212,7 @@ namespace NzbDrone.Core.Notifications.Plex.Server } var error = response.Contains("_children") ? - Json.Deserialize(response) : + Json.Deserialize(response) : Json.Deserialize>(response).MediaContainer; if (error != null && !error.Error.IsNullOrWhiteSpace()) diff --git a/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs b/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs index 05e680a3a..52fd3fe06 100644 --- a/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs +++ b/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs @@ -33,7 +33,7 @@ namespace NzbDrone.Core.Notifications.Pushalot public override void OnMovieRename(Movie movie) { } - + public override string Name => "Pushalot"; public override ValidationResult Test() diff --git a/src/NzbDrone.Core/Notifications/Pushalot/PushalotProxy.cs b/src/NzbDrone.Core/Notifications/Pushalot/PushalotProxy.cs index 40cdfb235..b30b92b90 100644 --- a/src/NzbDrone.Core/Notifications/Pushalot/PushalotProxy.cs +++ b/src/NzbDrone.Core/Notifications/Pushalot/PushalotProxy.cs @@ -33,7 +33,7 @@ namespace NzbDrone.Core.Notifications.Pushalot if (settings.Image) { - request.AddParameter("Image", "https://raw.githubusercontent.com/Radarr/Radarr/develop/Logo/128.png"); + request.AddParameter("Image", "https://raw.githubusercontent.com/Radarr/Radarr/develop/Logo/128.png"); } request.AddParameter("Title", title); diff --git a/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs b/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs index 22cf4d05f..e87e1321e 100644 --- a/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs +++ b/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs @@ -7,7 +7,7 @@ namespace NzbDrone.Core.Notifications.Pushover public class Pushover : NotificationBase { private readonly IPushoverProxy _proxy; - + public Pushover(IPushoverProxy proxy) { _proxy = proxy; diff --git a/src/NzbDrone.Core/Notifications/Slack/Slack.cs b/src/NzbDrone.Core/Notifications/Slack/Slack.cs index a314fd5c6..5173c36a3 100644 --- a/src/NzbDrone.Core/Notifications/Slack/Slack.cs +++ b/src/NzbDrone.Core/Notifications/Slack/Slack.cs @@ -12,7 +12,7 @@ namespace NzbDrone.Core.Notifications.Slack public class Slack : NotificationBase { private readonly ISlackProxy _proxy; - + public Slack(ISlackProxy proxy) { _proxy = proxy; @@ -64,7 +64,7 @@ namespace NzbDrone.Core.Notifications.Slack Title = movie.Title, } }; - + var payload = CreatePayload("Renamed", attachments); _proxy.SendPayload(payload, Settings); diff --git a/src/NzbDrone.Core/Notifications/Twitter/TwitterService.cs b/src/NzbDrone.Core/Notifications/Twitter/TwitterService.cs index b8327b479..87fb38eb9 100644 --- a/src/NzbDrone.Core/Notifications/Twitter/TwitterService.cs +++ b/src/NzbDrone.Core/Notifications/Twitter/TwitterService.cs @@ -46,7 +46,7 @@ namespace NzbDrone.Core.Notifications.Twitter var oAuthRequest = OAuthRequest.ForAccessToken(consumerKey, consumerSecret, oauthToken, "", oauthVerifier); oAuthRequest.RequestUrl = "https://api.twitter.com/oauth/access_token"; var qscoll = OAuthQuery(oAuthRequest); - + return new OAuthToken { AccessToken = qscoll["oauth_token"], @@ -90,7 +90,7 @@ namespace NzbDrone.Core.Notifications.Twitter message += string.Format(" @{0}", settings.Mention); } - twitter.UpdateStatus(message); + twitter.UpdateStatus(message); } } catch (WebException ex) diff --git a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs index 4fd93e6ee..d2a3f4ca6 100644 --- a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs +++ b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs @@ -416,7 +416,7 @@ namespace NzbDrone.Core.Organizer { return; } - + var schemaRevision = movieFile.MediaInfo != null ? movieFile.MediaInfo.SchemaRevision : 0; var matches = TitleRegex.Matches(pattern); diff --git a/src/NzbDrone.Core/Organizer/FileNameBuilderTokenEqualityComparer.cs b/src/NzbDrone.Core/Organizer/FileNameBuilderTokenEqualityComparer.cs index fde022c10..1b11f81c2 100644 --- a/src/NzbDrone.Core/Organizer/FileNameBuilderTokenEqualityComparer.cs +++ b/src/NzbDrone.Core/Organizer/FileNameBuilderTokenEqualityComparer.cs @@ -11,7 +11,7 @@ namespace NzbDrone.Core.Organizer private FileNameBuilderTokenEqualityComparer() { - + } public bool Equals(string s1, string s2) diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 9b5ebbdba..5eee7b420 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -259,7 +259,7 @@ namespace NzbDrone.Core.Parser if (!subGroup.IsNullOrWhiteSpace()) { result.ReleaseGroup = subGroup; - } + } Logger.Debug("Release Group parsed: {0}", result.ReleaseGroup); diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index 95ad21d7e..992a64681 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -70,7 +70,7 @@ namespace NzbDrone.Core.Parser private static readonly Regex HDShitQualityRegex = new Regex(@"(HD-TS|HDTS|HDTSRip|HD-TC|HDTC|HDCAM|HD-CAM)", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex HardcodedSubsRegex = new Regex(@"\b(?(\w+SUBS?)\b)|(?(HC|SUBBED))\b", + private static readonly Regex HardcodedSubsRegex = new Regex(@"\b(?(\w+SUBS?)\b)|(?(HC|SUBBED))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); public static QualityModel ParseQuality(string name) diff --git a/src/NzbDrone.Core/Parser/RomanNumerals/RomanNumeral.cs b/src/NzbDrone.Core/Parser/RomanNumerals/RomanNumeral.cs index 8a5fa6218..233bad2bc 100644 --- a/src/NzbDrone.Core/Parser/RomanNumerals/RomanNumeral.cs +++ b/src/NzbDrone.Core/Parser/RomanNumerals/RomanNumeral.cs @@ -92,8 +92,8 @@ namespace NzbDrone.Core.Parser.RomanNumerals /// Converts the string representation of a number to its 32-bit signed integer equivalent. A return value indicates whether the conversion succeeded. /// /// A string containing a number to convert. - /// When this method returns, contains the 32-bit signed integer value equivalent of the number contained in , - /// if the conversion succeeded, or zero if the conversion failed. The conversion fails if the parameter is null or + /// When this method returns, contains the 32-bit signed integer value equivalent of the number contained in , + /// if the conversion succeeded, or zero if the conversion failed. The conversion fails if the parameter is null or /// , is not of the correct format, or represents a number less than or greater than . This parameter is passed uninitialized. 1 /// /// true if was converted successfully; otherwise, false. diff --git a/src/NzbDrone.Core/Parser/RomanNumerals/RomanNumeralParser.cs b/src/NzbDrone.Core/Parser/RomanNumerals/RomanNumeralParser.cs index c4a41994e..38066af65 100644 --- a/src/NzbDrone.Core/Parser/RomanNumerals/RomanNumeralParser.cs +++ b/src/NzbDrone.Core/Parser/RomanNumerals/RomanNumeralParser.cs @@ -139,7 +139,7 @@ namespace NzbDrone.Core.Parser.RomanNumerals - + } } diff --git a/src/NzbDrone.Core/Profiles/Delay/DelayProfileRepository.cs b/src/NzbDrone.Core/Profiles/Delay/DelayProfileRepository.cs index 8ad771ff3..3766cfbba 100644 --- a/src/NzbDrone.Core/Profiles/Delay/DelayProfileRepository.cs +++ b/src/NzbDrone.Core/Profiles/Delay/DelayProfileRepository.cs @@ -5,7 +5,7 @@ namespace NzbDrone.Core.Profiles.Delay { public interface IDelayProfileRepository : IBasicRepository { - + } public class DelayProfileRepository : BasicRepository, IDelayProfileRepository diff --git a/src/NzbDrone.Core/Profiles/Delay/DelayProfileService.cs b/src/NzbDrone.Core/Profiles/Delay/DelayProfileService.cs index da7f3fa93..85d2aa054 100644 --- a/src/NzbDrone.Core/Profiles/Delay/DelayProfileService.cs +++ b/src/NzbDrone.Core/Profiles/Delay/DelayProfileService.cs @@ -31,12 +31,12 @@ namespace NzbDrone.Core.Profiles.Delay } public DelayProfile Add(DelayProfile profile) - { + { profile.Order = _repo.Count(); var result = _repo.Insert(profile); _bestForTagsCache.Clear(); - + return result; } @@ -138,7 +138,7 @@ namespace NzbDrone.Core.Profiles.Delay delayProfile.Order = afterCount; afterCount++; } - + else if (delayProfile.Order > movingOrder) { delayProfile.Order--; diff --git a/src/NzbDrone.Core/ProgressMessaging/ProgressMessageContext.cs b/src/NzbDrone.Core/ProgressMessaging/ProgressMessageContext.cs index a87ec5586..9911c4722 100644 --- a/src/NzbDrone.Core/ProgressMessaging/ProgressMessageContext.cs +++ b/src/NzbDrone.Core/ProgressMessaging/ProgressMessageContext.cs @@ -10,7 +10,7 @@ namespace NzbDrone.Core.ProgressMessaging [ThreadStatic] private static bool _reentrancyLock; - + public static CommandModel CommandModel { get { return _commandModel; } diff --git a/src/NzbDrone.Core/ProgressMessaging/ProgressMessageTarget.cs b/src/NzbDrone.Core/ProgressMessaging/ProgressMessageTarget.cs index 6b69d3046..60a863e38 100644 --- a/src/NzbDrone.Core/ProgressMessaging/ProgressMessageTarget.cs +++ b/src/NzbDrone.Core/ProgressMessaging/ProgressMessageTarget.cs @@ -24,7 +24,7 @@ namespace NzbDrone.Core.ProgressMessaging var command = ProgressMessageContext.CommandModel; if (!IsClientMessage(logEvent, command)) return; - + if (!ProgressMessageContext.LockReentrancy()) return; try { diff --git a/src/NzbDrone.Core/Qualities/Quality.cs b/src/NzbDrone.Core/Qualities/Quality.cs index caf4682c7..ed0f34e81 100644 --- a/src/NzbDrone.Core/Qualities/Quality.cs +++ b/src/NzbDrone.Core/Qualities/Quality.cs @@ -107,7 +107,7 @@ namespace NzbDrone.Core.Qualities public static Quality WEBRip480p => new Quality(12, "WEBRip-480p", Source.WEBRIP, 480); public static Quality WEBRip720p => new Quality(14, "WEBRip-720p", Source.WEBRIP, 720); public static Quality WEBRip1080p => new Quality(15, "WEBRip-1080p", Source.WEBRIP, 1080); - public static Quality WEBRip2160p => new Quality(17, "WEBRip-2160p", Source.WEBRIP, 2160); + public static Quality WEBRip2160p => new Quality(17, "WEBRip-2160p", Source.WEBRIP, 2160); static Quality() { diff --git a/src/NzbDrone.Core/Qualities/QualityFinder.cs b/src/NzbDrone.Core/Qualities/QualityFinder.cs index b62d68206..7277121b1 100644 --- a/src/NzbDrone.Core/Qualities/QualityFinder.cs +++ b/src/NzbDrone.Core/Qualities/QualityFinder.cs @@ -39,7 +39,7 @@ namespace NzbDrone.Core.Qualities } } - //Check for Modifier match + //Check for Modifier match var matchingModifier = Quality.All.Where(q => q.Modifier == modifer); var matchingResolution = matchingModifier.Where(q => q.Resolution == resolution) diff --git a/src/NzbDrone.Core/Qualities/Revision.cs b/src/NzbDrone.Core/Qualities/Revision.cs index e8e7108e5..d9590db59 100644 --- a/src/NzbDrone.Core/Qualities/Revision.cs +++ b/src/NzbDrone.Core/Qualities/Revision.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core.Qualities private Revision() { } - + public Revision(int version = 1, int real = 0, bool isRepack = false) { Version = version; diff --git a/src/NzbDrone.Core/Queue/QueueService.cs b/src/NzbDrone.Core/Queue/QueueService.cs index 1387d3c5b..9d2931407 100644 --- a/src/NzbDrone.Core/Queue/QueueService.cs +++ b/src/NzbDrone.Core/Queue/QueueService.cs @@ -58,7 +58,7 @@ namespace NzbDrone.Core.Queue { var queue = new Queue { - Languages = trackedDownload.RemoteMovie?.ParsedMovieInfo.Languages ?? new List { Language.Unknown }, + Languages = trackedDownload.RemoteMovie?.ParsedMovieInfo.Languages ?? new List { Language.Unknown }, Quality = trackedDownload.RemoteMovie?.ParsedMovieInfo.Quality ?? new QualityModel(Quality.Unknown), Title = trackedDownload.DownloadItem.Title, Size = trackedDownload.DownloadItem.TotalSize, diff --git a/src/NzbDrone.Core/Tags/TagService.cs b/src/NzbDrone.Core/Tags/TagService.cs index 219f9ce28..814c2d1fe 100644 --- a/src/NzbDrone.Core/Tags/TagService.cs +++ b/src/NzbDrone.Core/Tags/TagService.cs @@ -76,7 +76,7 @@ namespace NzbDrone.Core.Tags { var tag = GetTag(tagId); var delayProfiles = _delayProfileService.AllForTag(tagId); - var netImports = _netImportFactory.AllForTag(tagId); + var netImports = _netImportFactory.AllForTag(tagId); var notifications = _notificationFactory.AllForTag(tagId); var restrictions = _restrictionService.AllForTag(tagId); var movies = _movieService.AllForTag(tagId); diff --git a/src/NzbDrone.Core/TinyTwitter.cs b/src/NzbDrone.Core/TinyTwitter.cs index cd03c37b5..c6bf228b3 100644 --- a/src/NzbDrone.Core/TinyTwitter.cs +++ b/src/NzbDrone.Core/TinyTwitter.cs @@ -43,11 +43,11 @@ namespace TinyTwitter } /** - * + * * As of June 26th 2015 Direct Messaging is not part of TinyTwitter. * I have added it to Sonarr's copy to make our implementation easier * and added this banner so it's not blindly updated. - * + * **/ public void DirectMessage(string message, string screenName) @@ -104,7 +104,7 @@ namespace TinyTwitter WriteRequestBody(request); // It looks like a bug in HttpWebRequest. It throws random TimeoutExceptions - // after some requests. Abort the request seems to work. More info: + // after some requests. Abort the request seems to work. More info: // http://stackoverflow.com/questions/2252762/getrequeststream-throws-timeout-exception-randomly var response = request.GetResponse(); diff --git a/src/NzbDrone.Core/Validation/Paths/MappedNetworkDriveValidator.cs b/src/NzbDrone.Core/Validation/Paths/MappedNetworkDriveValidator.cs index d075f7689..28a3192ab 100644 --- a/src/NzbDrone.Core/Validation/Paths/MappedNetworkDriveValidator.cs +++ b/src/NzbDrone.Core/Validation/Paths/MappedNetworkDriveValidator.cs @@ -29,7 +29,7 @@ namespace NzbDrone.Core.Validation.Paths var path = context.PropertyValue.ToString(); if (!DriveRegex.IsMatch(path)) return true; - + var mount = _diskProvider.GetMount(path); if (mount != null && mount.DriveType == DriveType.Network) diff --git a/src/NzbDrone.Core/Validation/Paths/StartupFolderValidator.cs b/src/NzbDrone.Core/Validation/Paths/StartupFolderValidator.cs index 04b943b2b..9f9dbb722 100644 --- a/src/NzbDrone.Core/Validation/Paths/StartupFolderValidator.cs +++ b/src/NzbDrone.Core/Validation/Paths/StartupFolderValidator.cs @@ -7,7 +7,7 @@ namespace NzbDrone.Core.Validation.Paths public class StartupFolderValidator : PropertyValidator { private readonly IAppFolderInfo _appFolderInfo; - + public StartupFolderValidator(IAppFolderInfo appFolderInfo) : base("Path cannot be an ancestor of the start up folder") diff --git a/src/NzbDrone.Host/ApplicationServer.cs b/src/NzbDrone.Host/ApplicationServer.cs index b3f581a37..e4cad8251 100644 --- a/src/NzbDrone.Host/ApplicationServer.cs +++ b/src/NzbDrone.Host/ApplicationServer.cs @@ -99,7 +99,7 @@ namespace Radarr.Host _browserService.LaunchWebUI(); } - + _container.Resolve().PublishEvent(new ApplicationStartedEvent()); } diff --git a/src/NzbDrone.Host/Bootstrap.cs b/src/NzbDrone.Host/Bootstrap.cs index 4c00d2e75..d4181f150 100644 --- a/src/NzbDrone.Host/Bootstrap.cs +++ b/src/NzbDrone.Host/Bootstrap.cs @@ -72,7 +72,7 @@ namespace Radarr.Host EnsureSingleInstance(applicationModes == ApplicationModes.Service, startupContext); } - + _container.Resolve().Route(applicationModes); } diff --git a/src/NzbDrone.Host/CancelHandler.cs b/src/NzbDrone.Host/CancelHandler.cs index 18e1fa992..7aa785b6d 100644 --- a/src/NzbDrone.Host/CancelHandler.cs +++ b/src/NzbDrone.Host/CancelHandler.cs @@ -8,13 +8,13 @@ namespace Radarr.Host { void Attach(); } - + class CancelHandler : ICancelHandler { private object _syncRoot; private volatile bool _cancelInitiated; private readonly ILifecycleService _lifecycleService; - + public CancelHandler(ILifecycleService lifecycleService) { _lifecycleService = lifecycleService; @@ -25,19 +25,19 @@ namespace Radarr.Host Console.CancelKeyPress += HandlerCancelKeyPress; _syncRoot = new object(); } - + private void HandlerCancelKeyPress(object sender, ConsoleCancelEventArgs e) { // Tell system to ignore the Ctrl+C and not terminate. We'll do that. e.Cancel = true; - + var shouldTerminate = false; lock (_syncRoot) { shouldTerminate = _cancelInitiated; _cancelInitiated = true; } - + // TODO: Probably should schedule these on the threadpool. if (shouldTerminate) { @@ -46,16 +46,16 @@ namespace Radarr.Host else { GracefulShutdown(); - } + } } - + private void GracefulShutdown() { Console.WriteLine("Shutdown requested, press Ctrl+C again to terminate directly."); // TODO: Sent ApplicationShutdownRequested event or something like it. _lifecycleService.Shutdown(); } - + private void UngracefulShutdown() { Console.WriteLine("Termination requested."); diff --git a/src/NzbDrone.Integration.Test/ApiTests/FileSystemFixture.cs b/src/NzbDrone.Integration.Test/ApiTests/FileSystemFixture.cs index ec572dc79..3d2f47028 100644 --- a/src/NzbDrone.Integration.Test/ApiTests/FileSystemFixture.cs +++ b/src/NzbDrone.Integration.Test/ApiTests/FileSystemFixture.cs @@ -16,7 +16,7 @@ namespace NzbDrone.Integration.Test.ApiTests public class FileSystemFixture : IntegrationTest { public ClientBase FileSystem; - + private string _file; private string _folder; @@ -33,7 +33,7 @@ namespace NzbDrone.Integration.Test.ApiTests _file = Assembly.GetExecutingAssembly().Location; _folder = Path.GetDirectoryName(_file) + Path.DirectorySeparatorChar; } - + [Test] public void get_filesystem_content_excluding_files() { diff --git a/src/NzbDrone.Integration.Test/ApiTests/ReleaseFixture.cs b/src/NzbDrone.Integration.Test/ApiTests/ReleaseFixture.cs index d9d1f1f93..199ad94d1 100644 --- a/src/NzbDrone.Integration.Test/ApiTests/ReleaseFixture.cs +++ b/src/NzbDrone.Integration.Test/ApiTests/ReleaseFixture.cs @@ -37,8 +37,8 @@ namespace NzbDrone.Integration.Test.ApiTests // But if it didn't accept it, it would return NotFound. // TODO: Maybe we should create a full mock Newznab server endpoint. //var result = Releases.Post(new ReleaseResource { Guid = releases.First().Guid }); - //result.Guid.Should().Be(releases.First().Guid); - + //result.Guid.Should().Be(releases.First().Guid); + var result = Releases.Post(new ReleaseResource { Guid = releases.First().Guid }, HttpStatusCode.InternalServerError); } diff --git a/src/NzbDrone.Integration.Test/Client/CommandClient.cs b/src/NzbDrone.Integration.Test/Client/CommandClient.cs index d344fdb8c..7b96ae63c 100644 --- a/src/NzbDrone.Integration.Test/Client/CommandClient.cs +++ b/src/NzbDrone.Integration.Test/Client/CommandClient.cs @@ -72,7 +72,7 @@ namespace NzbDrone.Integration.Test.Client Thread.Sleep(500); resources = All(); } - + Assert.Fail("Commands still processing"); } } diff --git a/src/NzbDrone.Mono/Disk/SymbolicLinkResolver.cs b/src/NzbDrone.Mono/Disk/SymbolicLinkResolver.cs index 28edae7ca..91aec48c3 100644 --- a/src/NzbDrone.Mono/Disk/SymbolicLinkResolver.cs +++ b/src/NzbDrone.Mono/Disk/SymbolicLinkResolver.cs @@ -114,7 +114,7 @@ namespace NzbDrone.Mono.Disk path = UnixPath.GetCanonicalPath(path); } } while (true); - } + } } } diff --git a/src/NzbDrone.Mono/EnvironmentInfo/VersionAdapters/IssueFileVersionAdapter.cs b/src/NzbDrone.Mono/EnvironmentInfo/VersionAdapters/IssueFileVersionAdapter.cs index 7410a76d0..321a8c12e 100644 --- a/src/NzbDrone.Mono/EnvironmentInfo/VersionAdapters/IssueFileVersionAdapter.cs +++ b/src/NzbDrone.Mono/EnvironmentInfo/VersionAdapters/IssueFileVersionAdapter.cs @@ -34,7 +34,7 @@ namespace NzbDrone.Mono.EnvironmentInfo.VersionAdapters // Ubuntu 14.04.5 LTS \n \l // Ubuntu 16.04.1 LTS \n \l - // Fedora/Centos + // Fedora/Centos // Kernel \r on an \m (\l) // Arch Linux \r (\l) diff --git a/src/NzbDrone.Windows/Disk/DiskProvider.cs b/src/NzbDrone.Windows/Disk/DiskProvider.cs index 86482ecb9..ba3d889a4 100644 --- a/src/NzbDrone.Windows/Disk/DiskProvider.cs +++ b/src/NzbDrone.Windows/Disk/DiskProvider.cs @@ -47,7 +47,7 @@ namespace NzbDrone.Windows.Disk public override void SetPermissions(string path, string mask, string user, string group) { - + } public override long? GetTotalSize(string path) @@ -104,7 +104,7 @@ namespace NzbDrone.Windows.Disk return 0; } - + public override bool TryCreateHardLink(string source, string destination) { try diff --git a/src/NzbDrone/Properties/Resources.Designer.cs b/src/NzbDrone/Properties/Resources.Designer.cs index 019a4258e..062c5f8d9 100644 --- a/src/NzbDrone/Properties/Resources.Designer.cs +++ b/src/NzbDrone/Properties/Resources.Designer.cs @@ -24,15 +24,15 @@ namespace NzbDrone.Properties [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { - + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// @@ -46,7 +46,7 @@ namespace NzbDrone.Properties return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. @@ -60,7 +60,7 @@ namespace NzbDrone.Properties resourceCulture = value; } } - + /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// diff --git a/src/Radarr.Api.V3/Calendar/CalendarFeedModule.cs b/src/Radarr.Api.V3/Calendar/CalendarFeedModule.cs index a645cc474..f32575cef 100644 --- a/src/Radarr.Api.V3/Calendar/CalendarFeedModule.cs +++ b/src/Radarr.Api.V3/Calendar/CalendarFeedModule.cs @@ -23,7 +23,7 @@ namespace Radarr.Api.V3.Calendar { _movieService = movieService; _tagService = tagService; - + Get("/Radarr.ics", options => GetCalendarFeed()); } diff --git a/src/Radarr.Api.V3/History/HistoryModule.cs b/src/Radarr.Api.V3/History/HistoryModule.cs index 89d2c16f0..7feb64cd1 100644 --- a/src/Radarr.Api.V3/History/HistoryModule.cs +++ b/src/Radarr.Api.V3/History/HistoryModule.cs @@ -77,7 +77,7 @@ namespace Radarr.Api.V3.History { var queryDate = Request.Query.Date; var queryEventType = Request.Query.EventType; - + if (!queryDate.HasValue) { throw new BadRequestException("date is missing"); diff --git a/src/Radarr.Api.V3/History/HistoryResource.cs b/src/Radarr.Api.V3/History/HistoryResource.cs index 7eaf65168..ec3d4c261 100644 --- a/src/Radarr.Api.V3/History/HistoryResource.cs +++ b/src/Radarr.Api.V3/History/HistoryResource.cs @@ -21,7 +21,7 @@ namespace Radarr.Api.V3.History public HistoryEventType EventType { get; set; } public Dictionary Data { get; set; } - + public MovieResource Movie { get; set; } } @@ -34,7 +34,7 @@ namespace Radarr.Api.V3.History return new HistoryResource { Id = model.Id, - + MovieId = model.MovieId, SourceTitle = model.SourceTitle, Languages = model.Languages, diff --git a/src/Radarr.Api.V3/Logs/LogFileModuleBase.cs b/src/Radarr.Api.V3/Logs/LogFileModuleBase.cs index 2e2e42ff9..fbf72387a 100644 --- a/src/Radarr.Api.V3/Logs/LogFileModuleBase.cs +++ b/src/Radarr.Api.V3/Logs/LogFileModuleBase.cs @@ -39,7 +39,7 @@ namespace Radarr.Api.V3.Logs { var file = files[i]; var filename = Path.GetFileName(file); - + result.Add(new LogFileResource { Id = i + 1, @@ -63,7 +63,7 @@ namespace Radarr.Api.V3.Logs return new NotFoundResponse(); var data = _diskProvider.ReadAllText(filePath); - + return new TextResponse(data); } diff --git a/src/Radarr.Api.V3/ManualImport/ManualImportModule.cs b/src/Radarr.Api.V3/ManualImport/ManualImportModule.cs index ec0a6fb03..8fea5498e 100644 --- a/src/Radarr.Api.V3/ManualImport/ManualImportModule.cs +++ b/src/Radarr.Api.V3/ManualImport/ManualImportModule.cs @@ -37,7 +37,7 @@ namespace Radarr.Api.V3.ManualImport item.QualityWeight += item.Quality.Revision.Real * 10; item.QualityWeight += item.Quality.Revision.Version; } - + return item; } } diff --git a/src/Radarr.Api.V3/Movies/AlternativeTitleResource.cs b/src/Radarr.Api.V3/Movies/AlternativeTitleResource.cs index c78bcc251..93c2ed0b2 100644 --- a/src/Radarr.Api.V3/Movies/AlternativeTitleResource.cs +++ b/src/Radarr.Api.V3/Movies/AlternativeTitleResource.cs @@ -10,7 +10,7 @@ namespace Radarr.Api.V3.Movies { public AlternativeTitleResource() { - + } //Todo: Sorters should be done completely on the client diff --git a/src/Radarr.Api.V3/Movies/AlternativeYearResource.cs b/src/Radarr.Api.V3/Movies/AlternativeYearResource.cs index 67234f451..2e4daefe3 100644 --- a/src/Radarr.Api.V3/Movies/AlternativeYearResource.cs +++ b/src/Radarr.Api.V3/Movies/AlternativeYearResource.cs @@ -6,7 +6,7 @@ namespace Radarr.Api.V3.Movies { public AlternativeYearResource() { - + } //Todo: Sorters should be done completely on the client diff --git a/src/Radarr.Api.V3/Movies/MovieModule.cs b/src/Radarr.Api.V3/Movies/MovieModule.cs index 91317bab7..3822c3f13 100644 --- a/src/Radarr.Api.V3/Movies/MovieModule.cs +++ b/src/Radarr.Api.V3/Movies/MovieModule.cs @@ -17,11 +17,11 @@ using Radarr.Http; namespace Radarr.Api.V3.Movies { - public class MovieModule : RadarrRestModuleWithSignalR, + public class MovieModule : RadarrRestModuleWithSignalR, IHandle, IHandle, - IHandle, - IHandle, + IHandle, + IHandle, IHandle, IHandle, IHandle @@ -132,7 +132,7 @@ namespace Radarr.Api.V3.Movies _coverMapper.ConvertToLocalUrls(moviesResource.Id, moviesResource.Images); } } - + private void PopulateAlternateTitles(List resources) { foreach (var resource in resources) @@ -146,7 +146,7 @@ namespace Radarr.Api.V3.Movies //var mappings = null;//_sceneMappingService.FindByTvdbId(resource.TvdbId); //if (mappings == null) return; - + //Not necessary anymore //resource.AlternateTitles = mappings.Select(v => new AlternateTitleResource { Title = v.Title, SeasonNumber = v.SeasonNumber, SceneSeasonNumber = v.SceneSeasonNumber }).ToList(); diff --git a/src/Radarr.Api.V3/Movies/MovieResource.cs b/src/Radarr.Api.V3/Movies/MovieResource.cs index 21c7ac2a1..ce220f148 100644 --- a/src/Radarr.Api.V3/Movies/MovieResource.cs +++ b/src/Radarr.Api.V3/Movies/MovieResource.cs @@ -18,7 +18,7 @@ namespace Radarr.Api.V3.Movies //Todo: Sorters should be done completely on the client //Todo: Is there an easy way to keep IgnoreArticlesWhenSorting in sync between, Series, History, Missing? //Todo: We should get the entire Profile instead of ID and Name separately - + //View Only public string Title { get; set; } public List AlternateTitles { get; set; } @@ -66,7 +66,7 @@ namespace Radarr.Api.V3.Movies public AddMovieOptions AddOptions { get; set; } public Ratings Ratings { get; set; } public MovieFileResource MovieFile { get; set; } - + } public static class MovieResourceMapper @@ -94,18 +94,18 @@ namespace Radarr.Api.V3.Movies Overview = model.Overview, Images = model.Images, - + Year = model.Year, SecondaryYear = model.SecondaryYear, SecondaryYearSourceId = model.SecondaryYearSourceId, - + Path = model.Path, QualityProfileId = model.ProfileId, PathState = model.PathState, - + Monitored = model.Monitored, MinimumAvailability = model.MinimumAvailability, - + IsAvailable = model.IsAvailable(), FolderName = model.FolderName(), @@ -158,7 +158,7 @@ namespace Radarr.Api.V3.Movies Monitored = resource.Monitored, MinimumAvailability = resource.MinimumAvailability, - + Runtime = resource.Runtime, LastInfoSync = resource.LastInfoSync, CleanTitle = resource.CleanTitle, diff --git a/src/Radarr.Api.V3/NetImport/ImportExclusionsModule.cs b/src/Radarr.Api.V3/NetImport/ImportExclusionsModule.cs index 7353c51c3..6d0737047 100644 --- a/src/Radarr.Api.V3/NetImport/ImportExclusionsModule.cs +++ b/src/Radarr.Api.V3/NetImport/ImportExclusionsModule.cs @@ -32,7 +32,7 @@ namespace Radarr.Api.V3.NetImport { return _exclusionService.GetById(id).ToResource(); } - + public int AddExclusion(ImportExclusionsResource exclusionResource) { var model = exclusionResource.ToModel(); diff --git a/src/Radarr.Api.V3/ProviderResource.cs b/src/Radarr.Api.V3/ProviderResource.cs index 858cb4c71..e14944f69 100644 --- a/src/Radarr.Api.V3/ProviderResource.cs +++ b/src/Radarr.Api.V3/ProviderResource.cs @@ -25,7 +25,7 @@ namespace Radarr.Api.V3 where TProviderDefinition : ProviderDefinition, new() { public virtual TProviderResource ToResource(TProviderDefinition definition) - + { return new TProviderResource { diff --git a/src/Radarr.Api.V3/Queue/QueueModule.cs b/src/Radarr.Api.V3/Queue/QueueModule.cs index 1ec4c856c..cb3223eb4 100644 --- a/src/Radarr.Api.V3/Queue/QueueModule.cs +++ b/src/Radarr.Api.V3/Queue/QueueModule.cs @@ -122,7 +122,7 @@ namespace Radarr.Api.V3.Queue switch (pagingSpec.SortKey) { case "status": - return q => q.Status; + return q => q.Status; case "movie.sortTitle": return q => q.Movie.SortTitle; case "title": diff --git a/src/Radarr.Http/Authentication/AuthenticationService.cs b/src/Radarr.Http/Authentication/AuthenticationService.cs index 88615a93c..17b6c7820 100644 --- a/src/Radarr.Http/Authentication/AuthenticationService.cs +++ b/src/Radarr.Http/Authentication/AuthenticationService.cs @@ -33,7 +33,7 @@ namespace Radarr.Http.Authentication private static AuthenticationType AUTH_METHOD; [ThreadStatic] - private static NancyContext _context; + private static NancyContext _context; public AuthenticationService(IConfigFileProvider configFileProvider, IUserService userService) { diff --git a/src/Radarr.Http/ErrorManagement/RadarrErrorPipeline.cs b/src/Radarr.Http/ErrorManagement/RadarrErrorPipeline.cs index fbaf8b320..07ded72d1 100644 --- a/src/Radarr.Http/ErrorManagement/RadarrErrorPipeline.cs +++ b/src/Radarr.Http/ErrorManagement/RadarrErrorPipeline.cs @@ -29,7 +29,7 @@ namespace Radarr.Http.ErrorManagement _logger.Warn(apiException, "API Error"); return apiException.ToErrorResponse(context); } - + if (exception is ValidationException validationException) { _logger.Warn("Invalid request {0}", validationException.Message); diff --git a/src/Radarr.Http/Frontend/Mappers/StaticResourceMapper.cs b/src/Radarr.Http/Frontend/Mappers/StaticResourceMapper.cs index 1f86b8759..785543301 100644 --- a/src/Radarr.Http/Frontend/Mappers/StaticResourceMapper.cs +++ b/src/Radarr.Http/Frontend/Mappers/StaticResourceMapper.cs @@ -29,7 +29,7 @@ namespace Radarr.Http.Frontend.Mappers public override bool CanHandle(string resourceUrl) { resourceUrl = resourceUrl.ToLowerInvariant(); - + if (resourceUrl.StartsWith("/content/images/icons/manifest") || resourceUrl.StartsWith("/content/images/icons/browserconfig")) { diff --git a/src/Radarr.Http/RadarrRestModuleWithSignalR.cs b/src/Radarr.Http/RadarrRestModuleWithSignalR.cs index 587fd0860..b67127ab3 100644 --- a/src/Radarr.Http/RadarrRestModuleWithSignalR.cs +++ b/src/Radarr.Http/RadarrRestModuleWithSignalR.cs @@ -66,7 +66,7 @@ namespace Radarr.Http _signalRBroadcaster.BroadcastMessage(signalRMessage); } } - + protected void BroadcastResourceChange(ModelAction action) { if (!_signalRBroadcaster.IsConnected) return;