diff --git a/.editorconfig b/.editorconfig index 3d9c40d47..6c4ce4748 100644 --- a/.editorconfig +++ b/.editorconfig @@ -42,7 +42,6 @@ csharp_style_var_elsewhere = true:suggestion # Stylecop Rules dotnet_diagnostic.SA0001.severity = none -dotnet_diagnostic.SA1005.severity = none dotnet_diagnostic.SA1025.severity = none dotnet_diagnostic.SA1101.severity = none dotnet_diagnostic.SA1116.severity = none diff --git a/src/NzbDrone.Automation.Test/PageModel/PageBase.cs b/src/NzbDrone.Automation.Test/PageModel/PageBase.cs index a85ca9efa..21651f631 100644 --- a/src/NzbDrone.Automation.Test/PageModel/PageBase.cs +++ b/src/NzbDrone.Automation.Test/PageModel/PageBase.cs @@ -29,7 +29,7 @@ namespace NzbDrone.Automation.Test.PageModel public void WaitForNoSpinner(int timeout = 30) { - //give the spinner some time to show up. + // give the spinner some time to show up. Thread.Sleep(200); var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(timeout)); diff --git a/src/NzbDrone.Common.Test/DiskTests/DiskTransferServiceFixture.cs b/src/NzbDrone.Common.Test/DiskTests/DiskTransferServiceFixture.cs index 9e6799d43..c28be8b8a 100644 --- a/src/NzbDrone.Common.Test/DiskTests/DiskTransferServiceFixture.cs +++ b/src/NzbDrone.Common.Test/DiskTests/DiskTransferServiceFixture.cs @@ -394,7 +394,7 @@ namespace NzbDrone.Common.Test.DiskTests var destination = new DirectoryInfo(GetTempFilePath()); Subject.TransferFolder(source.FullName, destination.FullName, TransferMode.Copy); - //Delete Random File + // Delete Random File destination.GetFiles("*.*", SearchOption.AllDirectories).First().Delete(); Subject.TransferFolder(source.FullName, destination.FullName, TransferMode.Copy); diff --git a/src/NzbDrone.Common.Test/ServiceProviderTests.cs b/src/NzbDrone.Common.Test/ServiceProviderTests.cs index d0a8f7b3a..2fcb55822 100644 --- a/src/NzbDrone.Common.Test/ServiceProviderTests.cs +++ b/src/NzbDrone.Common.Test/ServiceProviderTests.cs @@ -14,7 +14,7 @@ namespace NzbDrone.Common.Test [TestFixture] public class ServiceProviderTests : TestBase { - private const string ALWAYS_INSTALLED_SERVICE = "SCardSvr"; //Smart Card + private const string ALWAYS_INSTALLED_SERVICE = "SCardSvr"; // Smart Card private const string TEMP_SERVICE_NAME = "NzbDrone_Nunit"; [SetUp] diff --git a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs index 3ee943a65..5a11a8e61 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs @@ -204,7 +204,7 @@ namespace NzbDrone.Common.EnvironmentInfo private static bool InternalIsOfficialBuild() { - //Official builds will never have such a high revision + // Official builds will never have such a high revision if (BuildInfo.Version.Major >= 10 || BuildInfo.Version.Revision > 10000) { return false; diff --git a/src/NzbDrone.Common/Extensions/PathExtensions.cs b/src/NzbDrone.Common/Extensions/PathExtensions.cs index 9975e9446..71182a786 100644 --- a/src/NzbDrone.Common/Extensions/PathExtensions.cs +++ b/src/NzbDrone.Common/Extensions/PathExtensions.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Common.Extensions var info = new FileInfo(path.Trim()); - //UNC + // UNC if (OsInfo.IsWindows && info.FullName.StartsWith(@"\\")) { return info.FullName.TrimEnd('/', '\\', ' '); @@ -168,7 +168,7 @@ namespace NzbDrone.Common.Extensions var parentDirInfo = dirInfo.Parent; if (parentDirInfo == null) { - //Drive letter + // Drive letter return dirInfo.Name.ToUpper(); } diff --git a/src/NzbDrone.Common/OAuth/OAuthTools.cs b/src/NzbDrone.Common/OAuth/OAuthTools.cs index 20ea671b6..6bd744a68 100644 --- a/src/NzbDrone.Common/OAuth/OAuthTools.cs +++ b/src/NzbDrone.Common/OAuth/OAuthTools.cs @@ -256,7 +256,7 @@ namespace NzbDrone.Common.OAuth sb.Append(!basic && !secure ? qualified : ""); sb.Append(url.AbsolutePath); - return sb.ToString(); //.ToLower(); + return sb.ToString(); // .ToLower(); } /// diff --git a/src/NzbDrone.Core.Test/Datastore/Migration/188_mediainfo_channel_propertiesFixture.cs b/src/NzbDrone.Core.Test/Datastore/Migration/188_mediainfo_channel_propertiesFixture.cs index 204c9ab4f..2409d8c53 100644 --- a/src/NzbDrone.Core.Test/Datastore/Migration/188_mediainfo_channel_propertiesFixture.cs +++ b/src/NzbDrone.Core.Test/Datastore/Migration/188_mediainfo_channel_propertiesFixture.cs @@ -73,17 +73,17 @@ namespace NzbDrone.Core.Test.Datastore.Migration var mediainfo = items.First().MediaInfo; - //Removed props should be null + // Removed props should be null mediainfo.AudioChannels.Should().BeNull(); mediainfo.AudioChannelPositionsText.Should().BeNull(); - //Renamed should have original value + // Renamed should have original value mediainfo.AudioChannelsContainer.Should().NotBeNull(); mediainfo.AudioChannelPositionsTextContainer.Should().NotBeNull(); mediainfo.AudioChannelsContainer.Should().Be(6); mediainfo.AudioChannelPositionsTextContainer.Should().Be("Front: L C R, Side: L R, LFE"); - //Should not touch other props + // Should not touch other props mediainfo.AudioChannelPositions.Should().Be("3/2/0.1"); } diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/DownloadDecisionMakerFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/DownloadDecisionMakerFixture.cs index ba5998517..ad49ae791 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/DownloadDecisionMakerFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/DownloadDecisionMakerFixture.cs @@ -234,7 +234,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests result.Should().HaveCount(1); - //result.First().RemoteMovie.DownloadAllowed.Should().BeFalse(); + // result.First().RemoteMovie.DownloadAllowed.Should().BeFalse(); } [Test] @@ -249,7 +249,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests result.Should().HaveCount(1); - //result.First().RemoteMovie.DownloadAllowed.Should().BeFalse(); + // result.First().RemoteMovie.DownloadAllowed.Should().BeFalse(); } [Test] diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/HistorySpecificationFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/HistorySpecificationFixture.cs index 2b2db3401..0e3fbbdf8 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/HistorySpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/HistorySpecificationFixture.cs @@ -103,7 +103,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests _upgradeHistory.IsSatisfiedBy(_parseResultSingle, null).Accepted.Should().BeTrue(); } - // [Test] + // [Test] // public void should_return_true_if_latest_history_has_a_download_id_and_cdh_is_enabled() // { // GivenMostRecentForEpisode(FIRST_EPISODE_ID, "test", _notupgradableQuality, DateTime.UtcNow, HistoryEventType.Grabbed); diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/PrioritizeDownloadDecisionFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/PrioritizeDownloadDecisionFixture.cs index 1cf77591d..7135778d6 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/PrioritizeDownloadDecisionFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/PrioritizeDownloadDecisionFixture.cs @@ -23,7 +23,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests { [TestFixture] - //TODO: Update for custom qualities! + // TODO: Update for custom qualities! public class PrioritizeDownloadDecisionFixture : CoreTest { private CustomFormat _customFormat1; diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/RssSync/DelaySpecificationFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/RssSync/DelaySpecificationFixture.cs index 84fa4f431..a7fd1a0e6 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/RssSync/DelaySpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/RssSync/DelaySpecificationFixture.cs @@ -67,7 +67,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests.RssSync private void GivenExistingFile(QualityModel quality) { - //_remoteEpisode.Episodes.First().EpisodeFileId = 1; + // _remoteEpisode.Episodes.First().EpisodeFileId = 1; _remoteMovie.Movie.MovieFile = new MovieFile { Quality = quality }; } diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/Search/TorrentSeedingSpecificationFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/Search/TorrentSeedingSpecificationFixture.cs index 979f7b538..dd59f003f 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/Search/TorrentSeedingSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/Search/TorrentSeedingSpecificationFixture.cs @@ -33,7 +33,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests.Search Title = "Series.Title.S01.720p.BluRay.X264-RlsGrp", Seeders = 0, - //IndexerSettings = new TorrentRssIndexerSettings {MinimumSeeders = 5} + // IndexerSettings = new TorrentRssIndexerSettings {MinimumSeeders = 5} } }; diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs index ffd188208..1bbacbe84 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs @@ -70,8 +70,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests VerifyIdentifiable(downloadClientItem); downloadClientItem.RemainingSize.Should().NotBe(0); - //downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero); - //downloadClientItem.OutputPath.Should().NotBeNullOrEmpty(); + // downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero); + // downloadClientItem.OutputPath.Should().NotBeNullOrEmpty(); downloadClientItem.Status.Should().Be(DownloadItemStatus.Queued); } @@ -81,8 +81,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests downloadClientItem.RemainingSize.Should().NotBe(0); - //downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero); - //downloadClientItem.OutputPath.Should().NotBeNullOrEmpty(); + // downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero); + // downloadClientItem.OutputPath.Should().NotBeNullOrEmpty(); downloadClientItem.Status.Should().Be(DownloadItemStatus.Paused); } @@ -92,8 +92,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests downloadClientItem.RemainingSize.Should().NotBe(0); - //downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero); - //downloadClientItem.OutputPath.Should().NotBeNullOrEmpty(); + // downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero); + // downloadClientItem.OutputPath.Should().NotBeNullOrEmpty(); downloadClientItem.Status.Should().Be(DownloadItemStatus.Downloading); } @@ -101,8 +101,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests { VerifyIdentifiable(downloadClientItem); - //downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero); - //downloadClientItem.OutputPath.Should().NotBeNullOrEmpty(); + // downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero); + // downloadClientItem.OutputPath.Should().NotBeNullOrEmpty(); downloadClientItem.Status.Should().Be(DownloadItemStatus.Downloading); } @@ -114,7 +114,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests downloadClientItem.RemainingSize.Should().Be(0); downloadClientItem.RemainingTime.Should().Be(TimeSpan.Zero); - //downloadClientItem.OutputPath.Should().NotBeNullOrEmpty(); + // downloadClientItem.OutputPath.Should().NotBeNullOrEmpty(); downloadClientItem.Status.Should().Be(DownloadItemStatus.Completed); } diff --git a/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/RemoveRejectedFixture.cs b/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/RemoveRejectedFixture.cs index ba64e3559..f3b2c5933 100644 --- a/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/RemoveRejectedFixture.cs +++ b/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/RemoveRejectedFixture.cs @@ -54,7 +54,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests _remoteMovie = new RemoteMovie(); - //_remoteEpisode.Episodes = new List{ _episode }; + // _remoteEpisode.Episodes = new List{ _episode }; _remoteMovie.Movie = _movie; _remoteMovie.ParsedMovieInfo = _parsedMovieInfo; _remoteMovie.Release = _release; diff --git a/src/NzbDrone.Core.Test/FluentTest.cs b/src/NzbDrone.Core.Test/FluentTest.cs index a17f142e3..df4adae3a 100644 --- a/src/NzbDrone.Core.Test/FluentTest.cs +++ b/src/NzbDrone.Core.Test/FluentTest.cs @@ -89,7 +89,7 @@ namespace NzbDrone.Core.Test { var result = new List().MaxOrDefault(); - //Resolve + // Resolve result.Should().Be(0); } @@ -100,7 +100,7 @@ namespace NzbDrone.Core.Test var result = list.MaxOrDefault(); - //Resolve + // Resolve result.Should().Be(10); } @@ -111,7 +111,7 @@ namespace NzbDrone.Core.Test var result = list.MaxOrDefault(); - //Resolve + // Resolve result.Should().Be(0); } @@ -122,7 +122,7 @@ namespace NzbDrone.Core.Test var resultString = str.Truncate(1000); - //Resolve + // Resolve var result = new UTF8Encoding().GetBytes(resultString); result.Length.Should().BeLessOrEqualTo(1000); } @@ -134,7 +134,7 @@ namespace NzbDrone.Core.Test var resultString = str.Truncate(1000); - //Resolve + // Resolve var result = new UTF8Encoding().GetBytes(resultString); result.Length.Should().Be(11); } @@ -144,7 +144,7 @@ namespace NzbDrone.Core.Test { var result = new List().MinOrDefault(); - //Resolve + // Resolve result.Should().Be(0); } @@ -155,7 +155,7 @@ namespace NzbDrone.Core.Test var result = list.MinOrDefault(); - //Resolve + // Resolve result.Should().Be(3); } @@ -166,7 +166,7 @@ namespace NzbDrone.Core.Test var result = list.MinOrDefault(); - //Resolve + // Resolve result.Should().Be(0); } diff --git a/src/NzbDrone.Core.Test/Framework/CoreTest.cs b/src/NzbDrone.Core.Test/Framework/CoreTest.cs index e7958e02b..8c2454c85 100644 --- a/src/NzbDrone.Core.Test/Framework/CoreTest.cs +++ b/src/NzbDrone.Core.Test/Framework/CoreTest.cs @@ -32,13 +32,13 @@ namespace NzbDrone.Core.Test.Framework Mocker.SetConstant(new RadarrCloudRequestBuilder()); } - //Used for tests that rely on parsing working correctly. + // Used for tests that rely on parsing working correctly. protected void UseRealParsingService() { - //Mocker.SetConstant(new ParsingService(Mocker.Resolve(), Mocker.Resolve(), Mocker.Resolve(), TestLogger)); + // Mocker.SetConstant(new ParsingService(Mocker.Resolve(), Mocker.Resolve(), Mocker.Resolve(), TestLogger)); } - //Used for tests that rely on parsing working correctly. Does some minimal parsing using the old static methods. + // Used for tests that rely on parsing working correctly. Does some minimal parsing using the old static methods. protected void ParseMovieTitle() { Mocker.GetMock().Setup(c => c.ParseMovieInfo(It.IsAny(), It.IsAny>())) diff --git a/src/NzbDrone.Core.Test/IndexerTests/NyaaTests/NyaaFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/NyaaTests/NyaaFixture.cs index 38e6a8e91..e65e920e2 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/NyaaTests/NyaaFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/NyaaTests/NyaaFixture.cs @@ -80,7 +80,7 @@ namespace NzbDrone.Core.Test.IndexerTests.NyaaTests torrentInfo.CommentUrl.Should().BeNullOrEmpty(); torrentInfo.Indexer.Should().Be(Subject.Definition.Name); torrentInfo.PublishDate.Should().Be(DateTime.Parse("Tue, 24 Aug 2021 22:18:46")); - torrentInfo.Size.Should().Be(639211930); //609.6 MiB + torrentInfo.Size.Should().Be(639211930); // 609.6 MiB torrentInfo.MagnetUrl.Should().Be(null); torrentInfo.Seeders.Should().Be(4); torrentInfo.Peers.Should().Be(3 + 4); diff --git a/src/NzbDrone.Core.Test/IndexerTests/PTPTests/PTPFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/PTPTests/PTPFixture.cs index 76c113f1a..0fadce7d2 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/PTPTests/PTPFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/PTPTests/PTPFixture.cs @@ -55,7 +55,7 @@ namespace NzbDrone.Core.Test.IndexerTests.PTPTests first.DownloadUrl.Should().Be("https://passthepopcorn.me/torrents.php?action=download&id=452135&authkey=00000000000000000000000000000000&torrent_pass=00000000000000000000000000000000"); first.InfoUrl.Should().Be("https://passthepopcorn.me/torrents.php?id=148131&torrentid=452135"); - //first.PublishDate.Should().Be(DateTime.Parse("2017-04-17T12:13:42+0000").ToUniversalTime()); stupid timezones + // first.PublishDate.Should().Be(DateTime.Parse("2017-04-17T12:13:42+0000").ToUniversalTime()); stupid timezones first.Size.Should().Be(2466170624L); first.InfoHash.Should().BeNullOrEmpty(); first.MagnetUrl.Should().BeNullOrEmpty(); diff --git a/src/NzbDrone.Core.Test/MediaFiles/DownloadedMoviesImportServiceFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/DownloadedMoviesImportServiceFixture.cs index fc2608b1a..553ca772d 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/DownloadedMoviesImportServiceFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/DownloadedMoviesImportServiceFixture.cs @@ -32,7 +32,7 @@ namespace NzbDrone.Core.Test.MediaFiles { ParseMovieTitle(); - //UseRealParsingService(); + // UseRealParsingService(); Mocker.GetMock().Setup(c => c.GetVideoFiles(It.IsAny(), It.IsAny())) .Returns(_videoFiles); diff --git a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportApprovedMoviesFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportApprovedMoviesFixture.cs index b68d89581..9a1870c0d 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportApprovedMoviesFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportApprovedMoviesFixture.cs @@ -24,7 +24,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MovieImport { [TestFixture] - //TODO: Update all of this for movies. + // TODO: Update all of this for movies. public class ImportApprovedMoviesFixture : CoreTest { private List _rejectedDecisions; diff --git a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportDecisionMakerFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportDecisionMakerFixture.cs index b17472708..bb1a3f301 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportDecisionMakerFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportDecisionMakerFixture.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MovieImport { [TestFixture] - //TODO: Add tests to ensure helpers for augmenters are correctly passed. + // TODO: Add tests to ensure helpers for augmenters are correctly passed. public class ImportDecisionMakerFixture : CoreTest { private List _videoFiles; diff --git a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Specifications/MatchesFolderSpecificationFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Specifications/MatchesFolderSpecificationFixture.cs index f001806cb..9a44e1a9b 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Specifications/MatchesFolderSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Specifications/MatchesFolderSpecificationFixture.cs @@ -23,7 +23,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MovieImport.Specifications .Build(); } - //TODO: Decide whether to reimplement this! + // TODO: Decide whether to reimplement this! /*[Test] public void should_be_accepted_for_existing_file() diff --git a/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxyFixture.cs b/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxyFixture.cs index d551b4295..b8e790a5b 100644 --- a/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxyFixture.cs +++ b/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxyFixture.cs @@ -42,7 +42,7 @@ namespace NzbDrone.Core.Test.MetadataSource.SkyHook movie.Studio.Should().NotBeNullOrWhiteSpace(); movie.Runtime.Should().BeGreaterThan(0); - //series.TvRageId.Should().BeGreaterThan(0); + // series.TvRageId.Should().BeGreaterThan(0); movie.TmdbId.Should().BeGreaterThan(0); } } diff --git a/src/NzbDrone.Core.Test/MovieTests/MovieIsAvailableFixture.cs b/src/NzbDrone.Core.Test/MovieTests/MovieIsAvailableFixture.cs index 930089c44..254fc9234 100644 --- a/src/NzbDrone.Core.Test/MovieTests/MovieIsAvailableFixture.cs +++ b/src/NzbDrone.Core.Test/MovieTests/MovieIsAvailableFixture.cs @@ -27,7 +27,7 @@ namespace NzbDrone.Core.Test.MovieTests _movie.MinimumAvailability = minimumAvailability; } - //minAvail = TBA + // minAvail = TBA [TestCase(null, null, null, MovieStatusType.TBA, true)] [TestCase("2000/01/01 21:10:42", null, null, MovieStatusType.TBA, true)] [TestCase("2100/01/01 21:10:42", null, null, MovieStatusType.TBA, true)] @@ -36,7 +36,7 @@ namespace NzbDrone.Core.Test.MovieTests [TestCase(null, null, "2000/01/01 21:10:42", MovieStatusType.TBA, true)] [TestCase(null, null, "2100/01/01 21:10:42", MovieStatusType.TBA, true)] - //minAvail = Announced + // minAvail = Announced [TestCase(null, null, null, MovieStatusType.Announced, true)] [TestCase("2000/01/01 21:10:42", null, null, MovieStatusType.Announced, true)] [TestCase("2100/01/01 21:10:42", null, null, MovieStatusType.Announced, true)] @@ -45,33 +45,33 @@ namespace NzbDrone.Core.Test.MovieTests [TestCase(null, null, "2000/01/01 21:10:42", MovieStatusType.Announced, true)] [TestCase(null, null, "2100/01/01 21:10:42", MovieStatusType.Announced, true)] - //minAvail = InCinemas - //InCinemas is known and in the past others are not known or in future + // minAvail = InCinemas + // InCinemas is known and in the past others are not known or in future [TestCase("2000/01/01 21:10:42", null, null, MovieStatusType.InCinemas, true)] [TestCase("2000/01/01 21:10:42", "2100/01/01 21:10:42", null, MovieStatusType.InCinemas, true)] [TestCase("2000/01/01 21:10:42", "2100/01/01 21:10:42", "2100/01/01 21:10:42", MovieStatusType.InCinemas, true)] [TestCase("2000/01/01 21:10:42", null, "2100/01/01 21:10:42", MovieStatusType.InCinemas, true)] - //InCinemas is known and in the future others are not known or in future + // InCinemas is known and in the future others are not known or in future [TestCase("2100/01/01 21:10:42", null, null, MovieStatusType.InCinemas, false)] [TestCase("2100/01/01 21:10:42", "2100/01/01 21:10:42", null, MovieStatusType.InCinemas, false)] [TestCase("2100/01/01 21:10:42", "2100/01/01 21:10:42", "2100/01/01 21:10:42", MovieStatusType.InCinemas, false)] [TestCase("2100/01/01 21:10:42", null, "2100/01/01 21:10:42", MovieStatusType.InCinemas, false)] - //handle the cases where InCinemas date is not known but Digital/Physical are and passed -- this refers to the issue being fixed along with these tests + // handle the cases where InCinemas date is not known but Digital/Physical are and passed -- this refers to the issue being fixed along with these tests [TestCase(null, "2000/01/01 21:10:42", null, MovieStatusType.InCinemas, true)] [TestCase(null, "2000/01/01 21:10:42", "2000/01/01 21:10:42", MovieStatusType.InCinemas, true)] [TestCase(null, null, "2000/01/01 21:10:42", MovieStatusType.InCinemas, true)] - //same as previous but digital/physical are in future + // same as previous but digital/physical are in future [TestCase(null, "2100/01/01 21:10:42", null, MovieStatusType.InCinemas, false)] [TestCase(null, "2100/01/01 21:10:42", "2100/01/01 21:10:42", MovieStatusType.InCinemas, false)] [TestCase(null, null, "2100/01/01 21:10:42", MovieStatusType.InCinemas, false)] - //no date values + // no date values [TestCase(null, null, null, MovieStatusType.InCinemas, false)] - //minAvail = Released + // minAvail = Released [TestCase(null, null, null, MovieStatusType.Released, false)] [TestCase("2000/01/01 21:10:42", null, null, MovieStatusType.Released, true)] [TestCase("2100/01/01 21:10:42", null, null, MovieStatusType.Released, false)] diff --git a/src/NzbDrone.Core.Test/MovieTests/MovieTitleNormalizerFixture.cs b/src/NzbDrone.Core.Test/MovieTests/MovieTitleNormalizerFixture.cs index 60c2d8bf7..625a693f3 100644 --- a/src/NzbDrone.Core.Test/MovieTests/MovieTitleNormalizerFixture.cs +++ b/src/NzbDrone.Core.Test/MovieTests/MovieTitleNormalizerFixture.cs @@ -7,7 +7,7 @@ namespace NzbDrone.Core.Test.MovieTests [TestFixture] public class MovieTitleNormalizerFixture { - //TODO: Decide on reimplementing this! + // TODO: Decide on reimplementing this! /* [TestCase("A to Z", 281588, "a to z")] [TestCase("A. D. - The Trials & Triumph of the Early Church", 266757, "ad trials triumph early church")] diff --git a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/CleanTitleFixture.cs b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/CleanTitleFixture.cs index 54015ec77..944631fa3 100644 --- a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/CleanTitleFixture.cs +++ b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/CleanTitleFixture.cs @@ -63,7 +63,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests [TestCase("backslash \\ backlash", "backslash backlash")] [TestCase("I'm the Boss", "Im the Boss")] - //[TestCase("", "")] + // [TestCase("", "")] public void should_get_expected_title_back(string title, string expected) { _series.Title = title; diff --git a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/FileNameBuilderFixture.cs b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/FileNameBuilderFixture.cs index de0137207..c06a762f0 100644 --- a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/FileNameBuilderFixture.cs +++ b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/FileNameBuilderFixture.cs @@ -332,7 +332,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests .Should().Be("30 Rock - 30.Rock.S01E01.xvid-LOL"); } - //TODO: Update this test or fix the underlying issue! + // TODO: Update this test or fix the underlying issue! /* [Test] public void should_replace_double_period_with_single_period() diff --git a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs index 83ce4b1c5..fbc63c404 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs @@ -110,7 +110,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Joe.Movie.2.EXTENDED.EDITION.2015.German.DL.PAL.DVDR-ETM", "Joe Movie 2", "EXTENDED EDITION", 2015)] [TestCase("Movie.EXTENDED.2011.HDRip.AC3.German.XviD-POE", "Movie", "EXTENDED", 2011)] - //Special cases (see description) + // Special cases (see description) [TestCase("Movie.Klasse.von.1999.1990.German.720p.HDTV.x264-NORETAiL", "Movie Klasse von 1999", "", 1990, Description = "year in the title")] [TestCase("Movie.Squad.2016.EXTENDED.German.DL.AC3.BDRip.x264-hqc", "Movie Squad", "EXTENDED", 2016, Description = "edition after year")] [TestCase("Movie.and.Movie.2010.Extended.Cut.German.DTS.DL.720p.BluRay.x264-HDS", "Movie and Movie", "Extended Cut", 2010, Description = "edition after year")] diff --git a/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/AugmentersTests/AugmentWithHistoryFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/AugmentersTests/AugmentWithHistoryFixture.cs index 8a9bc3c1f..498ef7a37 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/AugmentersTests/AugmentWithHistoryFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/AugmentersTests/AugmentWithHistoryFixture.cs @@ -22,7 +22,7 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests.AugmentersTests { base.Setup(); - //Add multi indexer + // Add multi indexer GivenIndexerSettings(new RarbgSettings { MultiLanguages = new List diff --git a/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/AugmentersTests/AugmentWithMediaInfoFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/AugmentersTests/AugmentWithMediaInfoFixture.cs index f61fa5813..19451afe4 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/AugmentersTests/AugmentWithMediaInfoFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/AugmentersTests/AugmentWithMediaInfoFixture.cs @@ -1,13 +1,13 @@ -//using FluentAssertions; -//using NUnit.Framework; -//using NzbDrone.Core.CustomFormats; -//using NzbDrone.Core.MediaFiles.MediaInfo; -//using NzbDrone.Core.Parser; -//using NzbDrone.Core.Parser.Augmenters; -//using NzbDrone.Core.Qualities; +// using FluentAssertions; +// using NUnit.Framework; +// using NzbDrone.Core.CustomFormats; +// using NzbDrone.Core.MediaFiles.MediaInfo; +// using NzbDrone.Core.Parser; +// using NzbDrone.Core.Parser.Augmenters; +// using NzbDrone.Core.Qualities; -//namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests.AugmentersTests -//{ +// namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests.AugmentersTests +// { // [TestFixture] // public class AugmentWithMediaInfoFixture : AugmentMovieInfoFixture // { @@ -22,7 +22,7 @@ // }; // MovieInfo.Quality = quality; -// var realWidth = 480; +// var realWidth = 480; // switch (realResolution) // { // case Resolution.R720p: @@ -35,19 +35,19 @@ // realWidth = 2160; // break; -// } +// } -// var mediaInfo = new MediaInfoModel +// var mediaInfo = new MediaInfoModel // { // Width = realWidth // }; -// var movieInfo = Subject.AugmentMovieInfo(MovieInfo, mediaInfo); +// var movieInfo = Subject.AugmentMovieInfo(MovieInfo, mediaInfo); // movieInfo.Quality.Resolution.Should().BeEquivalentTo(realResolution); // movieInfo.Quality.QualityDetectionSource.Should().BeEquivalentTo(QualityDetectionSource.MediaInfo); // } -// [TestCase(Resolution.R720P, Source.BLURAY, Resolution.R1080P, Modifier.BRDISK)] +// [TestCase(Resolution.R720P, Source.BLURAY, Resolution.R1080P, Modifier.BRDISK)] // [TestCase(Resolution.R1080P, Source.BLURAY, Resolution.R720P, Modifier.REMUX)] // [TestCase(Resolution.R480P, Source.BLURAY, Resolution.R720P)] // [TestCase(Resolution.R720P, Source.DVD, Resolution.R480P)] @@ -60,9 +60,9 @@ // Modifier = modifier, // }; -// MovieInfo.Quality = quality; +// MovieInfo.Quality = quality; -// var realWidth = 480; +// var realWidth = 480; // switch (realResolution) // { // case Resolution.R720P: @@ -75,16 +75,16 @@ // realWidth = 2160; // break; -// } +// } -// var mediaInfo = new MediaInfoModel +// var mediaInfo = new MediaInfoModel // { // Width = realWidth // }; -// var movieInfo = Subject.AugmentMovieInfo(MovieInfo, mediaInfo); +// var movieInfo = Subject.AugmentMovieInfo(MovieInfo, mediaInfo); // movieInfo.Quality.Resolution.Should().BeEquivalentTo(resolution); // movieInfo.Quality.QualityDetectionSource.Should().BeEquivalentTo(QualityDetectionSource.Name); // } // } -//} +// } diff --git a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs index 0a055a9e2..7a37df6cc 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -13,10 +13,10 @@ namespace NzbDrone.Core.Test.ParserTests [SetUp] public void Setup() { - //QualityDefinitionServiceFixture.SetupDefaultDefinitions(); + // QualityDefinitionServiceFixture.SetupDefaultDefinitions(); } - //public static object[] SelfQualityParserCases = QualityDefinition.DefaultQualityDefinitions.ToArray(); + // public static object[] SelfQualityParserCases = QualityDefinition.DefaultQualityDefinitions.ToArray(); public static object[] OtherSourceQualityParserCases = { new object[] { "SD TV", Source.TV, Resolution.R480p, Modifier.NONE }, diff --git a/src/NzbDrone.Core.Test/Profiles/ProfileServiceFixture.cs b/src/NzbDrone.Core.Test/Profiles/ProfileServiceFixture.cs index 583730671..b35386eb6 100644 --- a/src/NzbDrone.Core.Test/Profiles/ProfileServiceFixture.cs +++ b/src/NzbDrone.Core.Test/Profiles/ProfileServiceFixture.cs @@ -35,8 +35,8 @@ namespace NzbDrone.Core.Test.Profiles [Test] - //This confirms that new profiles are added only if no other profiles exists. - //We don't want to keep adding them back if a user deleted them on purpose. + // This confirms that new profiles are added only if no other profiles exists. + // We don't want to keep adding them back if a user deleted them on purpose. public void Init_should_skip_if_any_profiles_already_exist() { Mocker.GetMock() diff --git a/src/NzbDrone.Core.Test/Qualities/QualityFixture.cs b/src/NzbDrone.Core.Test/Qualities/QualityFixture.cs index 201ec4b15..2329a23e0 100644 --- a/src/NzbDrone.Core.Test/Qualities/QualityFixture.cs +++ b/src/NzbDrone.Core.Test/Qualities/QualityFixture.cs @@ -25,7 +25,7 @@ namespace NzbDrone.Core.Test.Qualities new object[] { 8, Quality.WEBDL480p }, new object[] { 9, Quality.HDTV1080p }, - //new object[] {10, Quality.RAWHD}, + // new object[] {10, Quality.RAWHD}, new object[] { 16, Quality.HDTV2160p }, new object[] { 18, Quality.WEBDL2160p }, new object[] { 19, Quality.Bluray2160p }, @@ -44,7 +44,7 @@ namespace NzbDrone.Core.Test.Qualities new object[] { Quality.WEBDL480p, 8 }, new object[] { Quality.HDTV1080p, 9 }, - //new object[] {Quality.RAWHD, 10}, + // new object[] {Quality.RAWHD, 10}, new object[] { Quality.HDTV2160p, 16 }, new object[] { Quality.WEBDL2160p, 18 }, new object[] { Quality.Bluray2160p, 19 }, diff --git a/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs b/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs index 6020a4f45..d379ad698 100644 --- a/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs +++ b/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs @@ -272,13 +272,13 @@ namespace NzbDrone.Core.Configuration return valueHolder.First().Value.Trim(); } - //Save the value + // Save the value if (persist) { SetValue(key, defaultValue); } - //return the default value + // return the default value return defaultValue.ToString(); }); } diff --git a/src/NzbDrone.Core/Configuration/IConfigService.cs b/src/NzbDrone.Core/Configuration/IConfigService.cs index c7252e5d7..2c5b3576e 100644 --- a/src/NzbDrone.Core/Configuration/IConfigService.cs +++ b/src/NzbDrone.Core/Configuration/IConfigService.cs @@ -13,17 +13,17 @@ namespace NzbDrone.Core.Configuration bool IsDefined(string key); - //Download Client + // Download Client string DownloadClientWorkingFolders { get; set; } int DownloadClientHistoryLimit { get; set; } int CheckForFinishedDownloadInterval { get; set; } - //Completed/Failed Download Handling (Download client) + // Completed/Failed Download Handling (Download client) bool EnableCompletedDownloadHandling { get; set; } bool AutoRedownloadFailed { get; set; } - //Media Management + // Media Management bool AutoUnmonitorPreviouslyDownloadedMovies { get; set; } string RecycleBin { get; set; } int RecycleBinCleanupDays { get; set; } @@ -40,12 +40,12 @@ namespace NzbDrone.Core.Configuration RescanAfterRefreshType RescanAfterRefresh { get; set; } bool AutoRenameFolders { get; set; } - //Permissions (Media Management) + // Permissions (Media Management) bool SetPermissionsLinux { get; set; } string ChmodFolder { get; set; } string ChownGroup { get; set; } - //Indexers + // Indexers int Retention { get; set; } int RssSyncInterval { get; set; } int MaximumSize { get; set; } @@ -62,10 +62,10 @@ namespace NzbDrone.Core.Configuration string ListSyncLevel { get; set; } string ImportExclusions { get; set; } - //Metadata Provider + // Metadata Provider TMDbCountryCode CertificationCountry { get; set; } - //UI + // UI int FirstDayOfWeek { get; set; } string CalendarWeekColumnHeader { get; set; } MovieRuntimeFormatType MovieRuntimeFormat { get; set; } @@ -78,17 +78,17 @@ namespace NzbDrone.Core.Configuration int MovieInfoLanguage { get; set; } int UILanguage { get; set; } - //Internal + // Internal bool CleanupMetadataImages { get; set; } string PlexClientIdentifier { get; } - //Forms Auth + // Forms Auth string RijndaelPassphrase { get; } string HmacPassphrase { get; } string RijndaelSalt { get; } string HmacSalt { get; } - //Proxy + // Proxy bool ProxyEnabled { get; } ProxyType ProxyType { get; } string ProxyHostname { get; } diff --git a/src/NzbDrone.Core/Datastore/Database.cs b/src/NzbDrone.Core/Datastore/Database.cs index 433fef0b6..e36241ef0 100644 --- a/src/NzbDrone.Core/Datastore/Database.cs +++ b/src/NzbDrone.Core/Datastore/Database.cs @@ -64,7 +64,7 @@ namespace NzbDrone.Core.Datastore { version = db.QueryFirstOrDefault("SHOW server_version"); - //Postgres can return extra info about operating system on version call, ignore this + // Postgres can return extra info about operating system on version call, ignore this version = Regex.Replace(version, @"\(.*?\)", ""); } catch diff --git a/src/NzbDrone.Core/Datastore/Migration/002_103_sonarr_squashed.cs b/src/NzbDrone.Core/Datastore/Migration/002_103_sonarr_squashed.cs index 5cbe3db10..8a5fb6daa 100644 --- a/src/NzbDrone.Core/Datastore/Migration/002_103_sonarr_squashed.cs +++ b/src/NzbDrone.Core/Datastore/Migration/002_103_sonarr_squashed.cs @@ -1,6 +1,6 @@ namespace NzbDrone.Core.Datastore.Migration { - //Migrations 002 - 103 were squashed in to 001, do not use these migration numbers, versions will be present in V1 migrated Radarr DBs + // Migrations 002 - 103 were squashed in to 001, do not use these migration numbers, versions will be present in V1 migrated Radarr DBs public class sonarr_squashed { } diff --git a/src/NzbDrone.Core/Datastore/Migration/107_fix_movie_files.cs b/src/NzbDrone.Core/Datastore/Migration/107_fix_movie_files.cs index d1b82b862..44af3cd76 100644 --- a/src/NzbDrone.Core/Datastore/Migration/107_fix_movie_files.cs +++ b/src/NzbDrone.Core/Datastore/Migration/107_fix_movie_files.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { - Alter.Table("MovieFiles").AlterColumn("Path").AsString().Nullable(); //Should be deleted, but to much work, ¯\_(ツ)_/¯ + Alter.Table("MovieFiles").AlterColumn("Path").AsString().Nullable(); // Should be deleted, but to much work, ¯\_(ツ)_/¯ } } } diff --git a/src/NzbDrone.Core/Datastore/Migration/117_update_movie_file.cs b/src/NzbDrone.Core/Datastore/Migration/117_update_movie_file.cs index bbcd501fc..0e180e18c 100644 --- a/src/NzbDrone.Core/Datastore/Migration/117_update_movie_file.cs +++ b/src/NzbDrone.Core/Datastore/Migration/117_update_movie_file.cs @@ -11,7 +11,7 @@ namespace NzbDrone.Core.Datastore.Migration { Create.Column("Edition").OnTable("MovieFiles").AsString().Nullable(); - //Execute.WithConnection(SetSortTitles); + // Execute.WithConnection(SetSortTitles); } private void SetSortTitles(IDbConnection conn, IDbTransaction tran) diff --git a/src/NzbDrone.Core/Datastore/Migration/121_update_filedate_config.cs b/src/NzbDrone.Core/Datastore/Migration/121_update_filedate_config.cs index ec9bf187a..0eb9fd440 100644 --- a/src/NzbDrone.Core/Datastore/Migration/121_update_filedate_config.cs +++ b/src/NzbDrone.Core/Datastore/Migration/121_update_filedate_config.cs @@ -42,23 +42,23 @@ namespace NzbDrone.Core.Datastore.Migration public static string ToUrlSlug(string value) { - //First to lower case + // First to lower case value = value.ToLowerInvariant(); - //Remove all accents + // Remove all accents var bytes = Encoding.GetEncoding("Cyrillic").GetBytes(value); value = Encoding.ASCII.GetString(bytes); - //Replace spaces + // Replace spaces value = Regex.Replace(value, @"\s", "-", RegexOptions.Compiled); - //Remove invalid chars + // Remove invalid chars value = Regex.Replace(value, @"[^a-z0-9\s-_]", "", RegexOptions.Compiled); - //Trim dashes from end + // Trim dashes from end value = value.Trim('-', '_'); - //Replace double occurences of - or _ + // Replace double occurences of - or _ value = Regex.Replace(value, @"([-_]){2,}", "$1", RegexOptions.Compiled); return value; diff --git a/src/NzbDrone.Core/Datastore/Migration/133_add_minimumavailability.cs b/src/NzbDrone.Core/Datastore/Migration/133_add_minimumavailability.cs index ddcfadf50..fcfc979f2 100644 --- a/src/NzbDrone.Core/Datastore/Migration/133_add_minimumavailability.cs +++ b/src/NzbDrone.Core/Datastore/Migration/133_add_minimumavailability.cs @@ -1,6 +1,6 @@ using FluentMigrator; -//using FluentMigrator.Expressions; +// using FluentMigrator.Expressions; using NzbDrone.Core.Datastore.Migration.Framework; using NzbDrone.Core.Movies; diff --git a/src/NzbDrone.Core/Datastore/Migration/147_add_custom_formats.cs b/src/NzbDrone.Core/Datastore/Migration/147_add_custom_formats.cs index d122b43d3..18ea0e87b 100644 --- a/src/NzbDrone.Core/Datastore/Migration/147_add_custom_formats.cs +++ b/src/NzbDrone.Core/Datastore/Migration/147_add_custom_formats.cs @@ -9,7 +9,7 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { - //Execute.WithConnection(RenameUrlToBaseUrl); + // Execute.WithConnection(RenameUrlToBaseUrl); Create.TableForModel("CustomFormats") .WithColumn("Name").AsString().Unique() .WithColumn("FormatTags").AsString(); diff --git a/src/NzbDrone.Core/Datastore/Migration/153_indexer_client_status_search_changes.cs b/src/NzbDrone.Core/Datastore/Migration/153_indexer_client_status_search_changes.cs index c03aa6ca0..5fead6186 100644 --- a/src/NzbDrone.Core/Datastore/Migration/153_indexer_client_status_search_changes.cs +++ b/src/NzbDrone.Core/Datastore/Migration/153_indexer_client_status_search_changes.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { - //Cleanup cases of Sonarr Interference with Radarr db + // Cleanup cases of Sonarr Interference with Radarr db if (Schema.Table("PendingReleases").Column("Reason").Exists()) { Delete.Column("Reason").FromTable("PendingReleases"); diff --git a/src/NzbDrone.Core/Datastore/Migration/167_remove_movie_pathstate.cs b/src/NzbDrone.Core/Datastore/Migration/167_remove_movie_pathstate.cs index 08532f410..d1f6793d8 100644 --- a/src/NzbDrone.Core/Datastore/Migration/167_remove_movie_pathstate.cs +++ b/src/NzbDrone.Core/Datastore/Migration/167_remove_movie_pathstate.cs @@ -14,7 +14,7 @@ namespace NzbDrone.Core.Datastore.Migration Alter.Table("MovieFiles").AddColumn("OriginalFilePath").AsString().Nullable(); - //This is Ignored in mapping, should not be in DB + // This is Ignored in mapping, should not be in DB Delete.Column("Path").FromTable("MovieFiles"); } } diff --git a/src/NzbDrone.Core/Datastore/Migration/177_language_improvements.cs b/src/NzbDrone.Core/Datastore/Migration/177_language_improvements.cs index ecd7639f0..6d82be217 100644 --- a/src/NzbDrone.Core/Datastore/Migration/177_language_improvements.cs +++ b/src/NzbDrone.Core/Datastore/Migration/177_language_improvements.cs @@ -45,7 +45,7 @@ namespace NzbDrone.Core.Datastore.Migration Execute.Sql("UPDATE \"NamingConfig\" SET \"RenameMovies\"=\"RenameEpisodes\""); Delete.Column("RenameEpisodes").FromTable("NamingConfig"); - //Manual SQL, Fluent Migrator doesn't support multi-column unique contraint on table creation, SQLite doesn't support adding it after creation + // Manual SQL, Fluent Migrator doesn't support multi-column unique contraint on table creation, SQLite doesn't support adding it after creation IfDatabase("sqlite").Execute.Sql("CREATE TABLE \"MovieTranslations\"(" + "\"Id\" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " + "\"MovieId\" INTEGER NOT NULL, " + @@ -70,7 +70,7 @@ namespace NzbDrone.Core.Datastore.Migration Execute.WithConnection(FixLanguagesMoveFile); Execute.WithConnection(FixLanguagesHistory); - //Force refresh all movies in library + // Force refresh all movies in library Update.Table("ScheduledTasks") .Set(new { LastExecution = "2014-01-01 00:00:00" }) .Where(new { TypeName = "NzbDrone.Core.Movies.Commands.RefreshMovieCommand" }); diff --git a/src/NzbDrone.Core/Datastore/Migration/180_fix_invalid_profile_references.cs b/src/NzbDrone.Core/Datastore/Migration/180_fix_invalid_profile_references.cs index 28d2650eb..853307fca 100644 --- a/src/NzbDrone.Core/Datastore/Migration/180_fix_invalid_profile_references.cs +++ b/src/NzbDrone.Core/Datastore/Migration/180_fix_invalid_profile_references.cs @@ -27,7 +27,7 @@ namespace NzbDrone.Core.Datastore.Migration // Only process if there are lists or movies existing in the DB if (movieRows.Any() || listRows.Any()) { - //If there are no Profiles lets add the defaults + // If there are no Profiles lets add the defaults if (!profiles.Any()) { InsertDefaultQualityProfiles(conn, tran); @@ -36,7 +36,7 @@ namespace NzbDrone.Core.Datastore.Migration var mostCommonProfileId = 0; - //If we have some movies, lets determine the most common profile used and use it for the bad entries + // If we have some movies, lets determine the most common profile used and use it for the bad entries if (movieRows.Any()) { mostCommonProfileId = movieRows.Select(x => x.ProfileId) @@ -53,11 +53,11 @@ namespace NzbDrone.Core.Datastore.Migration mostCommonProfileId = profiles.First(); } - //Correct any Movies that reference profiles that are null + // Correct any Movies that reference profiles that are null var sql = $"UPDATE \"Movies\" SET \"ProfileId\" = {mostCommonProfileId} WHERE \"Id\" IN(SELECT \"Movies\".\"Id\" FROM \"Movies\" LEFT OUTER JOIN \"Profiles\" ON \"Movies\".\"ProfileId\" = \"Profiles\".\"Id\" WHERE \"Profiles\".\"Id\" IS NULL)"; conn.Execute(sql, transaction: tran); - //Correct any Lists that reference profiles that are null + // Correct any Lists that reference profiles that are null sql = $"UPDATE \"NetImport\" SET \"ProfileId\" = {mostCommonProfileId} WHERE \"Id\" IN(SELECT \"NetImport\".\"Id\" FROM \"NetImport\" LEFT OUTER JOIN \"Profiles\" ON \"NetImport\".\"ProfileId\" = \"Profiles\".\"Id\" WHERE \"Profiles\".\"Id\" IS NULL)"; conn.Execute(sql, transaction: tran); } @@ -119,7 +119,7 @@ namespace NzbDrone.Core.Datastore.Migration { var profiles = new List(); - //Grab custom formats if any exist and add them to the new profiles + // Grab custom formats if any exist and add them to the new profiles var formats = conn.Query($"SELECT \"Id\" FROM \"CustomFormats\"").ToList(); profiles.Add(GetDefaultProfile("Any", diff --git a/src/NzbDrone.Core/Datastore/Migration/186_fix_tmdb_duplicates.cs b/src/NzbDrone.Core/Datastore/Migration/186_fix_tmdb_duplicates.cs index 70282ee89..44761539f 100644 --- a/src/NzbDrone.Core/Datastore/Migration/186_fix_tmdb_duplicates.cs +++ b/src/NzbDrone.Core/Datastore/Migration/186_fix_tmdb_duplicates.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Core.Datastore.Migration return; } - //Process duplicates to pick which to purge + // Process duplicates to pick which to purge foreach (var problemGroup in problemMovies) { var moviesWithFiles = problemGroup.Where(m => m.MovieFileId > 0); diff --git a/src/NzbDrone.Core/Datastore/Migration/188_mediainfo_channels.cs b/src/NzbDrone.Core/Datastore/Migration/188_mediainfo_channels.cs index 1268803a4..38c23e04b 100644 --- a/src/NzbDrone.Core/Datastore/Migration/188_mediainfo_channels.cs +++ b/src/NzbDrone.Core/Datastore/Migration/188_mediainfo_channels.cs @@ -11,7 +11,7 @@ namespace NzbDrone.Core.Datastore.Migration Execute.Sql("UPDATE \"MovieFiles\" SET \"MediaInfo\" = Replace(\"MediaInfo\", '\"audioChannels\"', '\"audioChannelsContainer\"');"); Execute.Sql("UPDATE \"MovieFiles\" SET \"MediaInfo\" = Replace(\"MediaInfo\", '\"audioChannelPositionsText\"', '\"audioChannelPositionsTextContainer\"');"); - //Change List Interval from Min to Hour + // Change List Interval from Min to Hour IfDatabase("sqlite").Execute.Sql("UPDATE \"Config\" SET \"Value\" = max((\"Value\" / 60) + 1, 6) WHERE \"Key\" = 'importlistsyncinterval'"); IfDatabase("postgres").Execute.Sql("UPDATE \"Config\" SET \"Value\" = greatest((\"Value\"::int / 60) + 1, 6) WHERE \"Key\" = 'importlistsyncinterval'"); } diff --git a/src/NzbDrone.Core/Datastore/Migration/199_mediainfo_to_ffmpeg.cs b/src/NzbDrone.Core/Datastore/Migration/199_mediainfo_to_ffmpeg.cs index 345c948fb..d2e8161ec 100644 --- a/src/NzbDrone.Core/Datastore/Migration/199_mediainfo_to_ffmpeg.cs +++ b/src/NzbDrone.Core/Datastore/Migration/199_mediainfo_to_ffmpeg.cs @@ -682,7 +682,7 @@ namespace NzbDrone.Core.Datastore.Migration var audioChannelsContainer = mediaInfo.AudioChannelsContainer; var audioChannelsStream = mediaInfo.AudioChannelsStream; - //Skip if the positions texts give us nothing + // Skip if the positions texts give us nothing if ((audioChannelPositionsTextContainer.IsNullOrWhiteSpace() || audioChannelPositionsTextContainer == "Object Based") && (audioChannelPositionsTextStream.IsNullOrWhiteSpace() || audioChannelPositionsTextStream == "Object Based")) { diff --git a/src/NzbDrone.Core/Datastore/Migration/202_remove_predb.cs b/src/NzbDrone.Core/Datastore/Migration/202_remove_predb.cs index ba3ae3788..03739e1d2 100644 --- a/src/NzbDrone.Core/Datastore/Migration/202_remove_predb.cs +++ b/src/NzbDrone.Core/Datastore/Migration/202_remove_predb.cs @@ -8,15 +8,15 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { - //Set PreDb entries to Released + // Set PreDb entries to Released Update.Table("Movies").Set(new { MinimumAvailability = 3 }).Where(new { MinimumAvailability = 4 }); Update.Table("ImportLists").Set(new { MinimumAvailability = 3 }).Where(new { MinimumAvailability = 4 }); - //Should never be set, but just in case + // Should never be set, but just in case Update.Table("Movies").Set(new { Status = 3 }).Where(new { Status = 4 }); Update.Table("ImportListMovies").Set(new { Status = 3 }).Where(new { Status = 4 }); - //Remove unused column + // Remove unused column Delete.Column("HasPreDBEntry").FromTable("Movies"); } } diff --git a/src/NzbDrone.Core/Datastore/Migration/204_ensure_identity_on_id_columns.cs b/src/NzbDrone.Core/Datastore/Migration/204_ensure_identity_on_id_columns.cs index ba5358ece..dd17a79dc 100644 --- a/src/NzbDrone.Core/Datastore/Migration/204_ensure_identity_on_id_columns.cs +++ b/src/NzbDrone.Core/Datastore/Migration/204_ensure_identity_on_id_columns.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { - //Purge Commands before reworking tables + // Purge Commands before reworking tables Delete.FromTable("Commands").AllRows(); IfDatabase("sqlite").Alter.Column("Id").OnTable("Movies").AsInt32().PrimaryKey().Identity(); diff --git a/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSchemaDumper.cs b/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSchemaDumper.cs index 4ae4e6e68..c46be41ee 100644 --- a/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSchemaDumper.cs +++ b/src/NzbDrone.Core/Datastore/Migration/Framework/SqliteSchemaDumper.cs @@ -206,7 +206,7 @@ namespace NzbDrone.Core.Datastore.Migration.Framework { table.Indexes = ReadIndexes(table.SchemaName, table.Name); - //table.ForeignKeys = ReadForeignKeys(table.SchemaName, table.Name); + // table.ForeignKeys = ReadForeignKeys(table.SchemaName, table.Name); } return tables; diff --git a/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs b/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs index ba58312de..95ce642cb 100644 --- a/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs +++ b/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs @@ -93,7 +93,7 @@ namespace NzbDrone.Core.DecisionEngine if (result == null) { result = new MappingResult { MappingResultType = MappingResultType.NotParsable }; - result.Movie = null; //To ensure we have a remote movie, else null exception on next line! + result.Movie = null; // To ensure we have a remote movie, else null exception on next line! result.RemoteMovie.ParsedMovieInfo = parsedMovieInfo; } } @@ -118,7 +118,7 @@ namespace NzbDrone.Core.DecisionEngine { if (parsedMovieInfo.Quality.HardcodedSubs.IsNotNullOrWhiteSpace()) { - //remoteMovie.DownloadAllowed = true; + // remoteMovie.DownloadAllowed = true; if (_configService.AllowHardcodedSubs) { decision = GetDecisionForReport(remoteMovie, searchCriteria); diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs index 8ca4a2c98..8d9f3cfd8 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs @@ -44,10 +44,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications { var minSize = qualityDefinition.MinSize.Value.Megabytes(); - //Multiply maxSize by Series.Runtime + // Multiply maxSize by Series.Runtime minSize = minSize * subject.Movie.MovieMetadata.Value.Runtime; - //If the parsed size is smaller than minSize we don't want it + // If the parsed size is smaller than minSize we don't want it if (subject.Release.Size < minSize) { var runtimeMessage = subject.Movie.Title; @@ -70,10 +70,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications { var maxSize = qualityDefinition.MaxSize.Value.Megabytes(); - //Multiply maxSize by Series.Runtime + // Multiply maxSize by Series.Runtime maxSize = maxSize * subject.Movie.MovieMetadata.Value.Runtime; - //If the parsed size is greater than maxSize we don't want it + // If the parsed size is greater than maxSize we don't want it if (subject.Release.Size > maxSize) { _logger.Debug("Item: {0}, Size: {1} is greater than maximum allowed size ({2} for {3}), rejecting", subject, subject.Release.Size, maxSize, subject.Movie.Title); diff --git a/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackholeSettings.cs b/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackholeSettings.cs index 0343acccd..6c1af0dc0 100644 --- a/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackholeSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackholeSettings.cs @@ -12,7 +12,7 @@ namespace NzbDrone.Core.Download.Clients.Blackhole { public TorrentBlackholeSettingsValidator() { - //Todo: Validate that the path actually exists + // Todo: Validate that the path actually exists RuleFor(c => c.TorrentFolder).IsValidPath(); RuleFor(c => c.MagnetFileExtension).NotEmpty(); } diff --git a/src/NzbDrone.Core/Download/Clients/Deluge/DelugeProxy.cs b/src/NzbDrone.Core/Download/Clients/Deluge/DelugeProxy.cs index ee24b5349..e6cad2df9 100644 --- a/src/NzbDrone.Core/Download/Clients/Deluge/DelugeProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/Deluge/DelugeProxy.cs @@ -82,7 +82,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge var filter = new Dictionary(); // TODO: get_torrents_status returns the files as well, which starts to cause deluge timeouts when you get enough season packs. - //var response = ProcessRequest>(settings, "core.get_torrents_status", filter, new String[0]); + // var response = ProcessRequest>(settings, "core.get_torrents_status", filter, new String[0]); var response = ProcessRequest(settings, "web.update_ui", RequiredProperties, filter); return GetTorrents(response); @@ -93,7 +93,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge var filter = new Dictionary(); filter.Add("label", label); - //var response = ProcessRequest>(settings, "core.get_torrents_status", filter, new String[0]); + // var response = ProcessRequest>(settings, "core.get_torrents_status", filter, new String[0]); var response = ProcessRequest(settings, "web.update_ui", RequiredProperties, filter); return GetTorrents(response); diff --git a/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs b/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs index 49e5dd573..547f084d0 100644 --- a/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs +++ b/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs @@ -39,13 +39,13 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic var title = remoteMovie.Release.Title; // We don't have full seasons in movies. - //if (remoteMovie.ParsedEpisodeInfo.FullSeason) - //{ + // if (remoteMovie.ParsedEpisodeInfo.FullSeason) + // { // throw new NotSupportedException("Full season releases are not supported with Pneumatic."); - //} + // } title = FileNameBuilder.CleanFileName(title); - //Save to the Pneumatic directory (The user will need to ensure its accessible by XBMC) + // Save to the Pneumatic directory (The user will need to ensure its accessible by XBMC) var nzbFile = Path.Combine(Settings.NzbFolder, title + ".nzb"); _logger.Debug("Downloading NZB from: {0} to: {1}", url, nzbFile); diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdProxy.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdProxy.cs index 6cee2a4d1..7e1d3418b 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdProxy.cs @@ -209,7 +209,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd if (!Json.TryDeserialize(response.Content, out result)) { - //Handle plain text responses from SAB + // Handle plain text responses from SAB result = new SabnzbdJsonError(); if (response.Content.StartsWith("error", StringComparison.InvariantCultureIgnoreCase)) diff --git a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentProxy.cs b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentProxy.cs index fb32c0598..00f0ede06 100644 --- a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentProxy.cs @@ -55,7 +55,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent "d.ratio=", // long "d.is_open=", // long "d.is_active=", // long - "d.complete=", //long + "d.complete=", // long "d.timestamp.finished="); // long (unix timestamp) var torrents = document.XPathSelectElement("./methodResponse/params/param/value/array/data") diff --git a/src/NzbDrone.Core/Download/Pending/PendingRelease.cs b/src/NzbDrone.Core/Download/Pending/PendingRelease.cs index 5ddc980b5..da86e76b7 100644 --- a/src/NzbDrone.Core/Download/Pending/PendingRelease.cs +++ b/src/NzbDrone.Core/Download/Pending/PendingRelease.cs @@ -13,7 +13,7 @@ namespace NzbDrone.Core.Download.Pending public ReleaseInfo Release { get; set; } public PendingReleaseReason Reason { get; set; } - //Not persisted + // Not persisted public RemoteMovie RemoteMovie { get; set; } } } diff --git a/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs b/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs index 91f950b47..3b06e50d2 100644 --- a/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs +++ b/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs @@ -204,7 +204,7 @@ namespace NzbDrone.Core.Download.Pending } } - //Return best quality release for each movie + // Return best quality release for each movie var deduped = queued.GroupBy(q => q.Movie.Id).Select(g => { var movies = g.First().Movie; @@ -359,8 +359,8 @@ namespace NzbDrone.Core.Download.Pending var compare = new QualityModelComparer(profile).Compare(remoteMovie.ParsedMovieInfo.Quality, existingReport.RemoteMovie.ParsedMovieInfo.Quality); - //Only remove lower/equal quality pending releases - //It is safer to retry these releases on the next round than remove it and try to re-add it (if its still in the feed) + // Only remove lower/equal quality pending releases + // It is safer to retry these releases on the next round than remove it and try to re-add it (if its still in the feed) if (compare >= 0) { _logger.Debug("Removing previously pending release, as it was grabbed."); diff --git a/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs b/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs index 8412bd477..5158b019c 100644 --- a/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs +++ b/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs @@ -114,7 +114,7 @@ namespace NzbDrone.Core.Download internal List GetQualifiedReports(IEnumerable decisions) { - //Process both approved and temporarily rejected + // Process both approved and temporarily rejected return decisions.Where(c => (c.Approved || c.TemporarilyRejected) && c.RemoteMovie.Movie != null).ToList(); } diff --git a/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadService.cs b/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadService.cs index 349b20c4c..ef2e36540 100644 --- a/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadService.cs +++ b/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadService.cs @@ -112,7 +112,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads .ToList(); var grabbedHistoryItem = historyItems.FirstOrDefault(h => h.EventType == MovieHistoryEventType.Grabbed); - //TODO: Create release info from history and use that here, so we don't loose indexer flags! + // TODO: Create release info from history and use that here, so we don't loose indexer flags! var parsedMovieInfo = _parsingService.ParseMovieInfo(trackedDownload.DownloadItem.Title, new List { grabbedHistoryItem }); if (parsedMovieInfo != null) diff --git a/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadStatusMessage.cs b/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadStatusMessage.cs index 2d8a30cfe..ee57fa41a 100644 --- a/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadStatusMessage.cs +++ b/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadStatusMessage.cs @@ -19,7 +19,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads Messages = new List { message }; } - //Constructor for use when deserializing JSON + // Constructor for use when deserializing JSON private TrackedDownloadStatusMessage() { } diff --git a/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs b/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs index e780e6d9c..1f4904064 100644 --- a/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs +++ b/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs @@ -30,8 +30,8 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Roksbox _logger = logger; } - //Re-enable when/if we store and use mpaa certification - //private static List ValidCertification = new List { "G", "NC-17", "PG", "PG-13", "R", "UR", "UNRATED", "NR", "TV-Y", "TV-Y7", "TV-Y7-FV", "TV-G", "TV-PG", "TV-14", "TV-MA" }; + // Re-enable when/if we store and use mpaa certification + // private static List ValidCertification = new List { "G", "NC-17", "PG", "PG-13", "R", "UR", "UNRATED", "NR", "TV-Y", "TV-Y7", "TV-Y7-FV", "TV-G", "TV-PG", "TV-14", "TV-MA" }; public override string Name => "Roksbox"; public override string GetFilenameAfterMove(Movie movie, MovieFile movieFile, MetadataFile metadataFile) diff --git a/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadata.cs b/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadata.cs index 09b7b66d3..142ee45c7 100644 --- a/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadata.cs +++ b/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadata.cs @@ -135,7 +135,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Wdtv return new List(); } - //Because we only support one image, attempt to get the Poster type, then if that fails grab the first + // Because we only support one image, attempt to get the Poster type, then if that fails grab the first var image = movie.MovieMetadata.Value.Images.SingleOrDefault(c => c.CoverType == MediaCoverTypes.Poster) ?? movie.MovieMetadata.Value.Images.FirstOrDefault(); if (image == null) { diff --git a/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs b/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs index 05e8fffec..1282fa75c 100644 --- a/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs +++ b/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs @@ -340,7 +340,7 @@ namespace NzbDrone.Core.Extras.Metadata return null; } - //Remove duplicate metadata files from DB and disk + // Remove duplicate metadata files from DB and disk foreach (var file in matchingMetadataFiles.Skip(1)) { var path = Path.Combine(movie.Path, file.RelativePath); diff --git a/src/NzbDrone.Core/History/HistoryService.cs b/src/NzbDrone.Core/History/HistoryService.cs index 7a2ff25f1..0994d04ec 100644 --- a/src/NzbDrone.Core/History/HistoryService.cs +++ b/src/NzbDrone.Core/History/HistoryService.cs @@ -182,7 +182,7 @@ namespace NzbDrone.Core.History if (downloadId.IsNullOrWhiteSpace()) { - downloadId = FindDownloadId(message); //For now fuck off. + downloadId = FindDownloadId(message); // For now fuck off. } var movie = message.MovieInfo.Movie; diff --git a/src/NzbDrone.Core/Http/HttpProxySettingsProvider.cs b/src/NzbDrone.Core/Http/HttpProxySettingsProvider.cs index a56bcf2e6..33ed6e31d 100644 --- a/src/NzbDrone.Core/Http/HttpProxySettingsProvider.cs +++ b/src/NzbDrone.Core/Http/HttpProxySettingsProvider.cs @@ -49,7 +49,7 @@ namespace NzbDrone.Core.Http public bool ShouldProxyBeBypassed(HttpProxySettings proxySettings, HttpUri url) { - //We are utilizing the WebProxy implementation here to save us having to re-implement it. This way we use Microsofts implementation + // We are utilizing the WebProxy implementation here to save us having to re-implement it. This way we use Microsofts implementation var proxy = new WebProxy(proxySettings.Host + ":" + proxySettings.Port, proxySettings.BypassLocalAddress, proxySettings.BypassListAsArray); return proxy.IsBypassed((Uri)url); diff --git a/src/NzbDrone.Core/ImportLists/CouchPotato/CouchPotatoAPI.cs b/src/NzbDrone.Core/ImportLists/CouchPotato/CouchPotatoAPI.cs index cd59a17fc..f94fdc9be 100644 --- a/src/NzbDrone.Core/ImportLists/CouchPotato/CouchPotatoAPI.cs +++ b/src/NzbDrone.Core/ImportLists/CouchPotato/CouchPotatoAPI.cs @@ -41,7 +41,7 @@ namespace NzbDrone.Core.ImportLists.CouchPotato public string[] actors { get; set; } public string[] writers { get; set; } - //public int? runtime { get; set; } + // public int? runtime { get; set; } public string type { get; set; } public string released { get; set; } } diff --git a/src/NzbDrone.Core/ImportLists/FetchAndParseImportListService.cs b/src/NzbDrone.Core/ImportLists/FetchAndParseImportListService.cs index 61d0d40c9..5d9c3f452 100644 --- a/src/NzbDrone.Core/ImportLists/FetchAndParseImportListService.cs +++ b/src/NzbDrone.Core/ImportLists/FetchAndParseImportListService.cs @@ -71,7 +71,7 @@ namespace NzbDrone.Core.ImportLists if (blockedLists.TryGetValue(importList.Definition.Id, out ImportListStatus blockedListStatus)) { _logger.Debug("Temporarily ignoring list {0} till {1} due to recent failures.", importList.Definition.Name, blockedListStatus.DisabledTill.Value.ToLocalTime()); - result.AnyFailure |= true; //Ensure we don't clean if a list is down + result.AnyFailure |= true; // Ensure we don't clean if a list is down continue; } diff --git a/src/NzbDrone.Core/ImportLists/RSSImport/RSSImportParser.cs b/src/NzbDrone.Core/ImportLists/RSSImport/RSSImportParser.cs index 396db4d36..5f9b8dc7d 100644 --- a/src/NzbDrone.Core/ImportLists/RSSImport/RSSImportParser.cs +++ b/src/NzbDrone.Core/ImportLists/RSSImport/RSSImportParser.cs @@ -55,7 +55,7 @@ namespace NzbDrone.Core.ImportLists.RSSImport } catch (Exception itemEx) { - //itemEx.Data.Add("Item", item.Title()); + // itemEx.Data.Add("Item", item.Title()); _logger.Error(itemEx, "An error occurred while processing list feed item from {0}", importResponse.Request.Url); } } @@ -127,7 +127,7 @@ namespace NzbDrone.Core.ImportLists.RSSImport releaseInfo = ProcessItem(item, releaseInfo); - //_logger.Trace("Parsed: {0}", releaseInfo.Title); + // _logger.Trace("Parsed: {0}", releaseInfo.Title); return PostProcess(item, releaseInfo); } @@ -142,7 +142,7 @@ namespace NzbDrone.Core.ImportLists.RSSImport } releaseInfo.Title = title; - var result = Parser.Parser.ParseMovieTitle(title); //Depreciated anyways + var result = Parser.Parser.ParseMovieTitle(title); // Depreciated anyways if (result != null) { diff --git a/src/NzbDrone.Core/ImportLists/RSSImport/RSSImportRequestGenerator.cs b/src/NzbDrone.Core/ImportLists/RSSImport/RSSImportRequestGenerator.cs index d4a786c73..ed8fc395e 100644 --- a/src/NzbDrone.Core/ImportLists/RSSImport/RSSImportRequestGenerator.cs +++ b/src/NzbDrone.Core/ImportLists/RSSImport/RSSImportRequestGenerator.cs @@ -16,10 +16,10 @@ namespace NzbDrone.Core.ImportLists.RSSImport return pageableRequests; } - //public ImportListPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) - //{ + // public ImportListPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) + // { // return new ImportListPageableRequestChain(); - //} + // } private IEnumerable GetMovies(string searchParameters) { var request = new ImportListRequest($"{Settings.Link.Trim()}", HttpAccept.Rss); diff --git a/src/NzbDrone.Core/ImportLists/RadarrList/RadarrListParser.cs b/src/NzbDrone.Core/ImportLists/RadarrList/RadarrListParser.cs index 29231930d..c778e555b 100644 --- a/src/NzbDrone.Core/ImportLists/RadarrList/RadarrListParser.cs +++ b/src/NzbDrone.Core/ImportLists/RadarrList/RadarrListParser.cs @@ -48,7 +48,7 @@ namespace NzbDrone.Core.ImportLists.RadarrList } catch (JsonSerializationException) { - //No error! + // No error! } if (importListResponse.HttpResponse.StatusCode != System.Net.HttpStatusCode.OK) diff --git a/src/NzbDrone.Core/ImportLists/RadarrList2/IMDb/IMDbListParser.cs b/src/NzbDrone.Core/ImportLists/RadarrList2/IMDb/IMDbListParser.cs index 54c2cb14f..fc38b16c2 100644 --- a/src/NzbDrone.Core/ImportLists/RadarrList2/IMDb/IMDbListParser.cs +++ b/src/NzbDrone.Core/ImportLists/RadarrList2/IMDb/IMDbListParser.cs @@ -31,7 +31,7 @@ namespace NzbDrone.Core.ImportLists.RadarrList2.IMDbList if (_settings.ListId.StartsWith("ls", StringComparison.OrdinalIgnoreCase)) { - //Parse TSV response from IMDB export + // Parse TSV response from IMDB export var rows = importResponse.Content.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); movies = rows.Skip(1).SelectList(m => m.Split(',')).Where(m => m.Length > 1).SelectList(i => new ImportListMovie { ImdbId = i[1] }); diff --git a/src/NzbDrone.Core/ImportLists/RadarrList2/IMDb/IMDbListRequestGenerator.cs b/src/NzbDrone.Core/ImportLists/RadarrList2/IMDb/IMDbListRequestGenerator.cs index 17e9e2a49..60cba5c82 100644 --- a/src/NzbDrone.Core/ImportLists/RadarrList2/IMDb/IMDbListRequestGenerator.cs +++ b/src/NzbDrone.Core/ImportLists/RadarrList2/IMDb/IMDbListRequestGenerator.cs @@ -9,7 +9,7 @@ namespace NzbDrone.Core.ImportLists.RadarrList2.IMDbList protected override HttpRequest GetHttpRequest() { - //Use IMDb list Export for user lists to bypass RadarrAPI caching + // Use IMDb list Export for user lists to bypass RadarrAPI caching if (Settings.ListId.StartsWith("ls", StringComparison.OrdinalIgnoreCase)) { return new HttpRequest($"https://www.imdb.com/list/{Settings.ListId}/export", new HttpAccept("*/*")); diff --git a/src/NzbDrone.Core/ImportLists/TMDb/List/TMDbListParser.cs b/src/NzbDrone.Core/ImportLists/TMDb/List/TMDbListParser.cs index 7a280d407..63533a5a4 100644 --- a/src/NzbDrone.Core/ImportLists/TMDb/List/TMDbListParser.cs +++ b/src/NzbDrone.Core/ImportLists/TMDb/List/TMDbListParser.cs @@ -26,7 +26,7 @@ namespace NzbDrone.Core.ImportLists.TMDb.List foreach (var movie in jsonResponse.Results) { - //Media Type is not Movie + // Media Type is not Movie if (movie.MediaType != "movie") { continue; diff --git a/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs b/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs index b132f3740..7d7219150 100644 --- a/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs +++ b/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs @@ -31,7 +31,7 @@ namespace NzbDrone.Core.IndexerSearch.Definitions cleanTitle = SpecialCharacter.Replace(cleanTitle, ""); cleanTitle = NonWord.Replace(cleanTitle, "+"); - //remove any repeating +s + // remove any repeating +s cleanTitle = Regex.Replace(cleanTitle, @"\+{2,}", "+"); cleanTitle = cleanTitle.RemoveAccent(); return cleanTitle.Trim('+', ' '); diff --git a/src/NzbDrone.Core/IndexerSearch/ReleaseSearchService.cs b/src/NzbDrone.Core/IndexerSearch/ReleaseSearchService.cs index 6571cd9f8..9fd495a4f 100644 --- a/src/NzbDrone.Core/IndexerSearch/ReleaseSearchService.cs +++ b/src/NzbDrone.Core/IndexerSearch/ReleaseSearchService.cs @@ -85,7 +85,7 @@ namespace NzbDrone.Core.IndexerSearch movie.MovieMetadata.Value.OriginalTitle }; - //Add Translation of wanted languages to search query + // Add Translation of wanted languages to search query foreach (var translation in translations.Where(a => wantedLanguages.Contains(a.Language))) { queryTranlations.Add(translation.Title); diff --git a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs index 54568ac4e..653846ddf 100644 --- a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs @@ -62,7 +62,7 @@ namespace NzbDrone.Core.Indexers { 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. + // 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 = () => { var cookies = _indexerStatusService.GetIndexerCookies(Definition.Id); diff --git a/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsRssParser.cs b/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsRssParser.cs index b3c345beb..c90a0fe3b 100644 --- a/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsRssParser.cs +++ b/src/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsRssParser.cs @@ -34,7 +34,7 @@ namespace NzbDrone.Core.Indexers.Omgwtfnzbs protected override string GetInfoUrl(XElement item) { - //Todo: Me thinks I need to parse details to get this... + // Todo: Me thinks I need to parse details to get this... var match = Regex.Match(item.Description(), @"(?:\View NZB\:\<\/b\>\s\.+?)(?:\"")", RegexOptions.IgnoreCase | RegexOptions.Compiled); diff --git a/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornParser.cs b/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornParser.cs index ac3e9372e..ae11e0196 100644 --- a/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornParser.cs +++ b/src/NzbDrone.Core/Indexers/PassThePopcorn/PassThePopcornParser.cs @@ -67,12 +67,12 @@ namespace NzbDrone.Core.Indexers.PassThePopcorn if (torrent.GoldenPopcorn) { - flags |= IndexerFlags.PTP_Golden; //title = $"{title} 🍿"; + flags |= IndexerFlags.PTP_Golden; // title = $"{title} 🍿"; } if (torrent.Checked) { - flags |= IndexerFlags.PTP_Approved; //title = $"{title} ✔"; + flags |= IndexerFlags.PTP_Approved; // title = $"{title} ✔"; } if (torrent.FreeleechType == "Freeleech") diff --git a/src/NzbDrone.Core/Indexers/Rarbg/RarbgResponse.cs b/src/NzbDrone.Core/Indexers/Rarbg/RarbgResponse.cs index 07ae3cfee..4087fc5ca 100644 --- a/src/NzbDrone.Core/Indexers/Rarbg/RarbgResponse.cs +++ b/src/NzbDrone.Core/Indexers/Rarbg/RarbgResponse.cs @@ -20,7 +20,7 @@ namespace NzbDrone.Core.Indexers.Rarbg public long size { get; set; } public DateTime pubdate { get; set; } - //This is named episode_info for movies as well as shows + // This is named episode_info for movies as well as shows public RarbgTorrentInfo episode_info { get; set; } public int? ranked { get; set; } public string info_page { get; set; } diff --git a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs index 04e08cf81..2f4cefdd5 100644 --- a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs +++ b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs @@ -87,7 +87,7 @@ namespace NzbDrone.Core.Instrumentation var connectionString = _connectionStringFactory.LogDbConnectionString; - //TODO: Probably need more robust way to differentiate what's being used + // TODO: Probably need more robust way to differentiate what's being used if (connectionString.Contains(".db")) { WriteSqliteLog(log, connectionString); diff --git a/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs b/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs index 38b695ccc..38d4e627a 100644 --- a/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs +++ b/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs @@ -50,19 +50,19 @@ namespace NzbDrone.Core.Instrumentation var rules = LogManager.Configuration.LoggingRules; - //Console + // Console SetMinimumLogLevel(rules, "consoleLogger", minimumConsoleLogLevel); - //Log Files + // Log Files SetMinimumLogLevel(rules, "appFileInfo", minimumLogLevel <= LogLevel.Info ? LogLevel.Info : LogLevel.Off); SetMinimumLogLevel(rules, "appFileDebug", minimumLogLevel <= LogLevel.Debug ? LogLevel.Debug : LogLevel.Off); SetMinimumLogLevel(rules, "appFileTrace", minimumLogLevel <= LogLevel.Trace ? LogLevel.Trace : LogLevel.Off); SetLogRotation(); - //Log Sql + // Log Sql SqlBuilderExtensions.LogSql = _configFileProvider.LogSql; - //Sentry + // Sentry ReconfigureSentry(); LogManager.ReconfigExistingLoggers(); diff --git a/src/NzbDrone.Core/Jobs/TaskManager.cs b/src/NzbDrone.Core/Jobs/TaskManager.cs index fab9e4b0b..78629e4a6 100644 --- a/src/NzbDrone.Core/Jobs/TaskManager.cs +++ b/src/NzbDrone.Core/Jobs/TaskManager.cs @@ -212,7 +212,7 @@ namespace NzbDrone.Core.Jobs private int GetImportListSyncInterval() { - //Enforce 6 hour min on list sync + // Enforce 6 hour min on list sync var interval = Math.Max(_configService.ImportListSyncInterval, 6); return interval * 60; diff --git a/src/NzbDrone.Core/MediaFiles/MediaFileAttributeService.cs b/src/NzbDrone.Core/MediaFiles/MediaFileAttributeService.cs index ae8d83667..0549ad773 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaFileAttributeService.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaFileAttributeService.cs @@ -33,7 +33,7 @@ namespace NzbDrone.Core.MediaFiles { if (OsInfo.IsWindows) { - //Wrapped in Try/Catch to prevent this from causing issues with remote NAS boxes + // Wrapped in Try/Catch to prevent this from causing issues with remote NAS boxes try { _diskProvider.InheritFolderPermissions(path); diff --git a/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs b/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs index 396537464..c6f9c5ee1 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs @@ -12,10 +12,10 @@ namespace NzbDrone.Core.MediaFiles { _fileExtensions = new Dictionary(StringComparer.OrdinalIgnoreCase) { - //Unknown + // Unknown { ".webm", Quality.Unknown }, - //SDTV + // SDTV { ".m4v", Quality.SDTV }, { ".3gp", Quality.SDTV }, { ".nsv", Quality.SDTV }, @@ -55,18 +55,18 @@ namespace NzbDrone.Core.MediaFiles { ".flv", Quality.SDTV }, { ".wpl", Quality.SDTV }, - //DVD + // DVD { ".img", Quality.DVD }, { ".iso", Quality.DVD }, { ".vob", Quality.DVD }, - //HD + // HD { ".mkv", Quality.WEBDL720p }, { ".mk3d", Quality.WEBDL720p }, { ".ts", Quality.SDTV }, { ".wtv", Quality.SDTV }, - //Bluray + // Bluray { ".m2ts", Quality.Bluray720p } }; } diff --git a/src/NzbDrone.Core/MediaFiles/MediaFileService.cs b/src/NzbDrone.Core/MediaFiles/MediaFileService.cs index 0fcf29fb9..3c09f5fe4 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaFileService.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaFileService.cs @@ -63,7 +63,7 @@ namespace NzbDrone.Core.MediaFiles public void Delete(MovieFile movieFile, DeleteMediaFileReason reason) { - //Little hack so we have the movie attached for the event consumers + // Little hack so we have the movie attached for the event consumers if (movieFile.Movie == null) { movieFile.Movie = _movieRepository.Get(movieFile.MovieId); diff --git a/src/NzbDrone.Core/MediaFiles/MovieImport/DetectSample.cs b/src/NzbDrone.Core/MediaFiles/MovieImport/DetectSample.cs index 5b1005918..7f516d6d3 100644 --- a/src/NzbDrone.Core/MediaFiles/MovieImport/DetectSample.cs +++ b/src/NzbDrone.Core/MediaFiles/MovieImport/DetectSample.cs @@ -77,25 +77,25 @@ namespace NzbDrone.Core.MediaFiles.MovieImport private int GetMinimumAllowedRuntime(MovieMetadata movie) { - //Anime short - 15 seconds + // Anime short - 15 seconds if (movie.Runtime <= 3) { return 15; } - //Webisodes - 90 seconds + // Webisodes - 90 seconds if (movie.Runtime <= 10) { return 90; } - //30 minute episodes - 5 minutes + // 30 minute episodes - 5 minutes if (movie.Runtime <= 30) { return 300; } - //60 minute episodes - 10 minutes + // 60 minute episodes - 10 minutes return 600; } } diff --git a/src/NzbDrone.Core/MediaFiles/MovieImport/ImportApprovedMovie.cs b/src/NzbDrone.Core/MediaFiles/MovieImport/ImportApprovedMovie.cs index 55b9b8971..3aa22f16d 100644 --- a/src/NzbDrone.Core/MediaFiles/MovieImport/ImportApprovedMovie.cs +++ b/src/NzbDrone.Core/MediaFiles/MovieImport/ImportApprovedMovie.cs @@ -52,7 +52,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport { _logger.Debug("Decisions: {0}", decisions.Count); - //I added a null op for the rare case that the quality is null. TODO: find out why that would even happen in the first place. + // I added a null op for the rare case that the quality is null. TODO: find out why that would even happen in the first place. var qualifiedImports = decisions.Where(c => c.Approved) .GroupBy(c => c.LocalMovie.Movie.Id, (i, s) => s .OrderByDescending(c => c.LocalMovie.Quality ?? new QualityModel { Quality = Quality.Unknown }, new QualityModelComparer(s.First().LocalMovie.Movie.Profile)) @@ -69,7 +69,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport try { - //check if already imported + // check if already imported if (importResults.Select(r => r.ImportDecision.LocalMovie.Movie) .Select(m => m.Id).Contains(localMovie.Movie.Id)) { @@ -120,7 +120,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport { movieFile.SceneName = localMovie.SceneName; movieFile.OriginalFilePath = GetOriginalFilePath(downloadClientItem, localMovie); - var moveResult = _movieFileUpgrader.UpgradeMovieFile(movieFile, localMovie, copyOnly); //TODO: Check if this works + var moveResult = _movieFileUpgrader.UpgradeMovieFile(movieFile, localMovie, copyOnly); // TODO: Check if this works oldFiles = moveResult.OldFiles; } else @@ -165,7 +165,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport } } - //Adding all the rejected decisions + // Adding all the rejected decisions importResults.AddRange(decisions.Where(c => !c.Approved) .Select(d => new ImportResult(d, d.Rejections.Select(r => r.Reason).ToArray()))); diff --git a/src/NzbDrone.Core/MediaFiles/MovieImport/ImportDecision.cs b/src/NzbDrone.Core/MediaFiles/MovieImport/ImportDecision.cs index 5b648c0c3..a8574e64c 100644 --- a/src/NzbDrone.Core/MediaFiles/MovieImport/ImportDecision.cs +++ b/src/NzbDrone.Core/MediaFiles/MovieImport/ImportDecision.cs @@ -18,15 +18,15 @@ namespace NzbDrone.Core.MediaFiles.MovieImport LocalMovie = localMovie; Rejections = rejections.ToList(); - //LocalMovie = new LocalMovie - //{ + // LocalMovie = new LocalMovie + // { // Quality = localMovie.Quality, // ExistingFile = localMovie.ExistingFile, // MediaInfo = localMovie.MediaInfo, // ParsedMovieInfo = localMovie.ParsedMovieInfo, // Path = localMovie.Path, // Size = localMovie.Size - //}; + // }; } } } diff --git a/src/NzbDrone.Core/MediaFiles/MovieImport/Manual/ManualImportService.cs b/src/NzbDrone.Core/MediaFiles/MovieImport/Manual/ManualImportService.cs index 082d2870f..1db5dc979 100644 --- a/src/NzbDrone.Core/MediaFiles/MovieImport/Manual/ManualImportService.cs +++ b/src/NzbDrone.Core/MediaFiles/MovieImport/Manual/ManualImportService.cs @@ -349,7 +349,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Manual localMovie.Languages = file.Languages; localMovie.ReleaseGroup = file.ReleaseGroup; - //TODO: Cleanup non-tracked downloads + // TODO: Cleanup non-tracked downloads var importDecision = new ImportDecision(localMovie); if (trackedDownload == null) diff --git a/src/NzbDrone.Core/MediaFiles/MovieImport/Specifications/MatchesFolderSpecification.cs b/src/NzbDrone.Core/MediaFiles/MovieImport/Specifications/MatchesFolderSpecification.cs index 590cd2d63..b957486d7 100644 --- a/src/NzbDrone.Core/MediaFiles/MovieImport/Specifications/MatchesFolderSpecification.cs +++ b/src/NzbDrone.Core/MediaFiles/MovieImport/Specifications/MatchesFolderSpecification.cs @@ -29,7 +29,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Specifications return Decision.Accept(); } - //TODO: Actually implement this!!!! + // TODO: Actually implement this!!!! /*var folderInfo = Parser.Parser.ParseMovieTitle(dirInfo.Name, false); if (folderInfo == null) diff --git a/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs b/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs index bfdb35217..7165327f3 100644 --- a/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs +++ b/src/NzbDrone.Core/MediaFiles/RecycleBinProvider.cs @@ -185,7 +185,7 @@ namespace NzbDrone.Core.MediaFiles } catch (UnauthorizedAccessException ex) { - //Handle and log permissions errors, move to next file + // Handle and log permissions errors, move to next file _logger.Error(ex.Message); continue; } diff --git a/src/NzbDrone.Core/MediaFiles/RenameMovieFileService.cs b/src/NzbDrone.Core/MediaFiles/RenameMovieFileService.cs index 2140a56ed..f793a6292 100644 --- a/src/NzbDrone.Core/MediaFiles/RenameMovieFileService.cs +++ b/src/NzbDrone.Core/MediaFiles/RenameMovieFileService.cs @@ -54,7 +54,7 @@ namespace NzbDrone.Core.MediaFiles var movie = _movieService.GetMovie(movieId); var file = _mediaFileService.GetFilesByMovie(movieId); - return GetPreviews(movie, file).OrderByDescending(m => m.MovieId).ToList(); //TODO: Would really like to not have these be lists + return GetPreviews(movie, file).OrderByDescending(m => m.MovieId).ToList(); // TODO: Would really like to not have these be lists } private IEnumerable GetPreviews(Movie movie, List files) diff --git a/src/NzbDrone.Core/Messaging/Events/EventAggregator.cs b/src/NzbDrone.Core/Messaging/Events/EventAggregator.cs index 78bc5f15c..9af45ca51 100644 --- a/src/NzbDrone.Core/Messaging/Events/EventAggregator.cs +++ b/src/NzbDrone.Core/Messaging/Events/EventAggregator.cs @@ -84,7 +84,7 @@ namespace NzbDrone.Core.Messaging.Events subscribers = target as EventSubscribers; } - //call synchronous handlers first. + // call synchronous handlers first. var handlers = subscribers._syncHandlers; foreach (var handler in handlers) { diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/MovieResource.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/MovieResource.cs index c3a0abe62..cea0e7979 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/MovieResource.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/MovieResource.cs @@ -12,7 +12,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource public string OriginalTitle { get; set; } public string TitleSlug { get; set; } - //Depricated but left in place until cache fills new object (MovieRatings) + // Depricated but left in place until cache fills new object (MovieRatings) public List Ratings { get; set; } public RatingResource MovieRatings { get; set; } public int? Runtime { get; set; } diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/TMDbCountryCode.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/TMDbCountryCode.cs index a2d8cccd8..22d8e0986 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/TMDbCountryCode.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/TMDbCountryCode.cs @@ -2,15 +2,15 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource { public enum TMDbCountryCode { - AU, //Australia - BR, //Brazil - CA, //Canada - FR, //France - DE, //Germany - GB, //Great Britain - IT, //Italy - ES, //Spain - US, //United States - NZ //New Zealand + AU, // Australia + BR, // Brazil + CA, // Canada + FR, // France + DE, // Germany + GB, // Great Britain + IT, // Italy + ES, // Spain + US, // United States + NZ // New Zealand } } diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs index 3f9d040c4..4703c0110 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs @@ -219,7 +219,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook movie.Year = resource.Year; - //If the premier differs from the TMDB year, use it as a secondary year. + // If the premier differs from the TMDB year, use it as a secondary year. if (resource.Premier.HasValue && resource.Premier?.Year != movie.Year) { movie.SecondaryYear = resource.Premier?.Year; @@ -244,10 +244,10 @@ namespace NzbDrone.Core.MetadataSource.SkyHook movie.Genres = resource.Genres; movie.Images = resource.Images.Select(MapImage).ToList(); - //movie.Genres = resource.Genres; + // movie.Genres = resource.Genres; movie.Recommendations = resource.Recommendations?.Select(r => r.TmdbId).ToList() ?? new List(); - //Workaround due to metadata change until cache cleans up + // Workaround due to metadata change until cache cleans up if (movie.Ratings.Tmdb == null) { var tmdbRating = resource.Ratings.FirstOrDefault(); @@ -387,8 +387,8 @@ namespace NzbDrone.Core.MetadataSource.SkyHook if (parserResult != null && parserResult.PrimaryMovieTitle != title) { - //Parser found something interesting! - parserTitle = parserResult.PrimaryMovieTitle.ToLower().Replace(".", " "); //TODO Update so not every period gets replaced (e.g. R.I.P.D.) + // Parser found something interesting! + parserTitle = parserResult.PrimaryMovieTitle.ToLower().Replace(".", " "); // TODO Update so not every period gets replaced (e.g. R.I.P.D.) if (parserResult.Year > 1800) { yearTerm = parserResult.Year.ToString(); diff --git a/src/NzbDrone.Core/Movies/Movie.cs b/src/NzbDrone.Core/Movies/Movie.cs index cb02a39a1..49a033e7a 100644 --- a/src/NzbDrone.Core/Movies/Movie.cs +++ b/src/NzbDrone.Core/Movies/Movie.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Core.Movies public bool HasFile => MovieFileId > 0; - //compatibility properties + // compatibility properties public string Title { get { return MovieMetadata.Value.Title; } @@ -67,17 +67,17 @@ namespace NzbDrone.Core.Movies return ""; } - //Well what about Path = Null? - //return new DirectoryInfo(Path).Name; + // Well what about Path = Null? + // return new DirectoryInfo(Path).Name; return Path; } public bool IsAvailable(int delay = 0) { - //the below line is what was used before delay was implemented, could still be used for cases when delay==0 - //return (Status >= MinimumAvailability || (MinimumAvailability == MovieStatusType.PreDB && Status >= MovieStatusType.Released)); + // the below line is what was used before delay was implemented, could still be used for cases when delay==0 + // return (Status >= MinimumAvailability || (MinimumAvailability == MovieStatusType.PreDB && Status >= MovieStatusType.Released)); - //This more complex sequence handles the delay + // This more complex sequence handles the delay DateTime minimumAvailabilityDate; if ((MinimumAvailability == MovieStatusType.TBA) || (MinimumAvailability == MovieStatusType.Announced)) diff --git a/src/NzbDrone.Core/Movies/MovieCutoffService.cs b/src/NzbDrone.Core/Movies/MovieCutoffService.cs index 1258b198d..448fcfbb8 100644 --- a/src/NzbDrone.Core/Movies/MovieCutoffService.cs +++ b/src/NzbDrone.Core/Movies/MovieCutoffService.cs @@ -28,7 +28,7 @@ namespace NzbDrone.Core.Movies var qualitiesBelowCutoff = new List(); var profiles = _profileService.All(); - //Get all items less than the cutoff + // Get all items less than the cutoff foreach (var profile in profiles) { var cutoff = profile.UpgradeAllowed ? profile.Cutoff : profile.FirststAllowedQuality().Id; diff --git a/src/NzbDrone.Core/Movies/MovieMetadata.cs b/src/NzbDrone.Core/Movies/MovieMetadata.cs index 193d3b5fa..6d82c5ce7 100644 --- a/src/NzbDrone.Core/Movies/MovieMetadata.cs +++ b/src/NzbDrone.Core/Movies/MovieMetadata.cs @@ -43,7 +43,7 @@ namespace NzbDrone.Core.Movies public MovieStatusType Status { get; set; } public string Overview { get; set; } - //Get Loaded via a Join Query + // Get Loaded via a Join Query public List AlternativeTitles { get; set; } public List Translations { get; set; } diff --git a/src/NzbDrone.Core/Movies/MovieService.cs b/src/NzbDrone.Core/Movies/MovieService.cs index c7e98fbd7..d96d499df 100644 --- a/src/NzbDrone.Core/Movies/MovieService.cs +++ b/src/NzbDrone.Core/Movies/MovieService.cs @@ -401,7 +401,7 @@ namespace NzbDrone.Core.Movies movie.MovieFileId = message.MovieFile.Id; _movieRepository.Update(movie); - //_movieRepository.SetFileId(message.MovieFile.Id, message.MovieFile.Movie.Value.Id); + // _movieRepository.SetFileId(message.MovieFile.Id, message.MovieFile.Movie.Value.Id); _logger.Info("Assigning file [{0}] to movie [{1}]", message.MovieFile.RelativePath, message.MovieFile.Movie); } diff --git a/src/NzbDrone.Core/Movies/MovieStatusType.cs b/src/NzbDrone.Core/Movies/MovieStatusType.cs index 68edad145..45154cd45 100644 --- a/src/NzbDrone.Core/Movies/MovieStatusType.cs +++ b/src/NzbDrone.Core/Movies/MovieStatusType.cs @@ -3,9 +3,9 @@ namespace NzbDrone.Core.Movies public enum MovieStatusType { Deleted = -1, - TBA = 0, //Nothing yet announced, only rumors, but still IMDb page (this might not be used) - Announced = 1, //Movie is announced but Cinema date is in the future or unknown - InCinemas = 2, //Been in Cinemas for less than 3 months (since TMDB lacks complete information) - Released = 3, //Physical or Web Release or been in cinemas for > 3 months (since TMDB lacks complete information) + TBA = 0, // Nothing yet announced, only rumors, but still IMDb page (this might not be used) + Announced = 1, // Movie is announced but Cinema date is in the future or unknown + InCinemas = 2, // Been in Cinemas for less than 3 months (since TMDB lacks complete information) + Released = 3, // Physical or Web Release or been in cinemas for > 3 months (since TMDB lacks complete information) } } diff --git a/src/NzbDrone.Core/Movies/RefreshMovieService.cs b/src/NzbDrone.Core/Movies/RefreshMovieService.cs index 2ffb705ad..e43adc464 100644 --- a/src/NzbDrone.Core/Movies/RefreshMovieService.cs +++ b/src/NzbDrone.Core/Movies/RefreshMovieService.cs @@ -112,7 +112,7 @@ namespace NzbDrone.Core.Movies movieMetadata.Runtime = movieInfo.Runtime; movieMetadata.Ratings = movieInfo.Ratings; - //movie.Genres = movieInfo.Genres; + // movie.Genres = movieInfo.Genres; movieMetadata.Certification = movieInfo.Certification; movieMetadata.InCinemas = movieInfo.InCinemas; movieMetadata.Website = movieInfo.Website; diff --git a/src/NzbDrone.Core/Movies/ShouldRefreshMovie.cs b/src/NzbDrone.Core/Movies/ShouldRefreshMovie.cs index c81b6e3bb..86ad65651 100644 --- a/src/NzbDrone.Core/Movies/ShouldRefreshMovie.cs +++ b/src/NzbDrone.Core/Movies/ShouldRefreshMovie.cs @@ -19,7 +19,7 @@ namespace NzbDrone.Core.Movies public bool ShouldRefresh(MovieMetadata movie) { - //return false; + // return false; if (movie.LastInfoSync < DateTime.UtcNow.AddDays(-180)) { _logger.Trace("Movie {0} last updated more than 180 days ago, should refresh.", movie.Title); diff --git a/src/NzbDrone.Core/Notifications/Discord/Discord.cs b/src/NzbDrone.Core/Notifications/Discord/Discord.cs index 331e6652c..0f25c186a 100644 --- a/src/NzbDrone.Core/Notifications/Discord/Discord.cs +++ b/src/NzbDrone.Core/Notifications/Discord/Discord.cs @@ -387,7 +387,7 @@ namespace NzbDrone.Core.Notifications.Discord private static string BytesToString(long byteCount) { - string[] suf = { "B", "KB", "MB", "GB", "TB", "PB", "EB" }; //Longs run out around EB + string[] suf = { "B", "KB", "MB", "GB", "TB", "PB", "EB" }; // Longs run out around EB if (byteCount == 0) { return "0 " + suf[0]; diff --git a/src/NzbDrone.Core/Notifications/Discord/DiscordSettings.cs b/src/NzbDrone.Core/Notifications/Discord/DiscordSettings.cs index c1df42ec2..ed1540cd1 100644 --- a/src/NzbDrone.Core/Notifications/Discord/DiscordSettings.cs +++ b/src/NzbDrone.Core/Notifications/Discord/DiscordSettings.cs @@ -18,7 +18,7 @@ namespace NzbDrone.Core.Notifications.Discord { public DiscordSettings() { - //Set Default Fields + // Set Default Fields GrabFields = new List { 0, 1, 2, 3, 5, 6, 7, 8, 9 }; ImportFields = new List { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12 }; } diff --git a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs index 675d06435..ac2ceb586 100644 --- a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs +++ b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs @@ -76,7 +76,7 @@ namespace NzbDrone.Core.Notifications.Emby { _logger.Debug("Looking for error in response: {0}", response); - //TODO: actually check for the error + // TODO: actually check for the error } } } diff --git a/src/NzbDrone.Core/Notifications/NotificationService.cs b/src/NzbDrone.Core/Notifications/NotificationService.cs index b552d087d..adb2aa822 100644 --- a/src/NzbDrone.Core/Notifications/NotificationService.cs +++ b/src/NzbDrone.Core/Notifications/NotificationService.cs @@ -69,7 +69,7 @@ namespace NzbDrone.Core.Notifications return true; } - //TODO: this message could be more clear + // TODO: this message could be more clear _logger.Debug("{0} does not have any intersecting tags with {1}. Notification will not be sent", definition.Name, movie.Title); return false; } diff --git a/src/NzbDrone.Core/Notifications/Telegram/TelegramProxy.cs b/src/NzbDrone.Core/Notifications/Telegram/TelegramProxy.cs index 675714227..ec6510554 100644 --- a/src/NzbDrone.Core/Notifications/Telegram/TelegramProxy.cs +++ b/src/NzbDrone.Core/Notifications/Telegram/TelegramProxy.cs @@ -29,7 +29,7 @@ namespace NzbDrone.Core.Notifications.Telegram public void SendNotification(string title, string message, TelegramSettings settings) { - //Format text to add the title before and bold using markdown + // Format text to add the title before and bold using markdown var text = $"{HttpUtility.HtmlEncode(title)}\n{HttpUtility.HtmlEncode(message)}"; var requestBuilder = new HttpRequestBuilder(URL).Resource("bot{token}/sendmessage").Post(); diff --git a/src/NzbDrone.Core/Notifications/Twitter/TwitterSettings.cs b/src/NzbDrone.Core/Notifications/Twitter/TwitterSettings.cs index b0702b010..be052226e 100644 --- a/src/NzbDrone.Core/Notifications/Twitter/TwitterSettings.cs +++ b/src/NzbDrone.Core/Notifications/Twitter/TwitterSettings.cs @@ -15,7 +15,7 @@ namespace NzbDrone.Core.Notifications.Twitter RuleFor(c => c.AccessToken).NotEmpty(); RuleFor(c => c.AccessTokenSecret).NotEmpty(); - //TODO: Validate that it is a valid username (numbers, letters and underscores - I think) + // TODO: Validate that it is a valid username (numbers, letters and underscores - I think) RuleFor(c => c.Mention).NotEmpty().When(c => c.DirectMessage); RuleFor(c => c.DirectMessage).Equal(true) diff --git a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs index 2f1000c6d..75a758d38 100644 --- a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs +++ b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs @@ -153,7 +153,7 @@ namespace NzbDrone.Core.Organizer public BasicNamingConfig GetBasicNamingConfig(NamingConfig nameSpec) { - return new BasicNamingConfig(); //For now let's be lazy + return new BasicNamingConfig(); // For now let's be lazy } public string GetMovieFolder(Movie movie, NamingConfig namingConfig = null) @@ -297,7 +297,7 @@ namespace NzbDrone.Core.Organizer return; } - tokenHandlers["{Release Year}"] = m => string.Format("{0}", releaseYear.ToString()); //Do I need m.CustomFormat? + tokenHandlers["{Release Year}"] = m => string.Format("{0}", releaseYear.ToString()); // Do I need m.CustomFormat? } private void AddIdTokens(Dictionary> tokenHandlers, Movie movie) diff --git a/src/NzbDrone.Core/Parser/Augmenters/AugmentWithHistory.cs b/src/NzbDrone.Core/Parser/Augmenters/AugmentWithHistory.cs index 080c3254f..d5b5c62a2 100644 --- a/src/NzbDrone.Core/Parser/Augmenters/AugmentWithHistory.cs +++ b/src/NzbDrone.Core/Parser/Augmenters/AugmentWithHistory.cs @@ -27,7 +27,7 @@ namespace NzbDrone.Core.Parser.Augmenters { if (helper is MovieHistory history && history.EventType == MovieHistoryEventType.Grabbed) { - //First we create a release info from history data. + // First we create a release info from history data. var releaseInfo = new ReleaseInfo(); if (int.TryParse(history.Data.GetValueOrDefault("indexerId"), out var indexerId)) @@ -45,7 +45,7 @@ namespace NzbDrone.Core.Parser.Augmenters releaseInfo.IndexerFlags = indexerFlags; } - //Now we run the release info augmenters from the history release info. TODO: Add setting to only do that if you trust your indexer! + // Now we run the release info augmenters from the history release info. TODO: Add setting to only do that if you trust your indexer! var releaseInfoAugmenters = _augmenters.Where(a => a.Value.HelperType.IsInstanceOfType(releaseInfo)); foreach (var augmenter in releaseInfoAugmenters) { diff --git a/src/NzbDrone.Core/Parser/Augmenters/AugmentWithMediaInfo.cs b/src/NzbDrone.Core/Parser/Augmenters/AugmentWithMediaInfo.cs index 5ab1a410d..50b88a321 100644 --- a/src/NzbDrone.Core/Parser/Augmenters/AugmentWithMediaInfo.cs +++ b/src/NzbDrone.Core/Parser/Augmenters/AugmentWithMediaInfo.cs @@ -45,7 +45,7 @@ namespace NzbDrone.Core.Parser.Augmenters if (existing != quality.Quality.Resolution) { - //_logger.Debug("Overwriting resolution info {0} with info from media info {1}", existing, quality.Resolution); + // _logger.Debug("Overwriting resolution info {0} with info from media info {1}", existing, quality.Resolution); quality.ResolutionDetectionSource = QualityDetectionSource.MediaInfo; movieInfo.Quality = quality; } diff --git a/src/NzbDrone.Core/Parser/Augmenters/AugmentWithReleaseInfo.cs b/src/NzbDrone.Core/Parser/Augmenters/AugmentWithReleaseInfo.cs index 6896d2be8..5b86e7420 100644 --- a/src/NzbDrone.Core/Parser/Augmenters/AugmentWithReleaseInfo.cs +++ b/src/NzbDrone.Core/Parser/Augmenters/AugmentWithReleaseInfo.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Core.Parser.Augmenters } catch (Exception) { - //_logger.Debug("Indexer with id {0} does not exist, skipping minimum seeder checks.", subject.Release.IndexerId); + // _logger.Debug("Indexer with id {0} does not exist, skipping minimum seeder checks.", subject.Release.IndexerId); } // First, let's augment the language! var languageTitle = movieInfo.SimpleReleaseTitle; @@ -54,7 +54,7 @@ namespace NzbDrone.Core.Parser.Augmenters } } - //Next, let's add other useful info to the extra info dict + // Next, let's add other useful info to the extra info dict if (!movieInfo.ExtraInfo.ContainsKey("Size")) { movieInfo.ExtraInfo["Size"] = releaseInfo.Size; diff --git a/src/NzbDrone.Core/Parser/IsoLanguages.cs b/src/NzbDrone.Core/Parser/IsoLanguages.cs index df33a110a..72eb74ccd 100644 --- a/src/NzbDrone.Core/Parser/IsoLanguages.cs +++ b/src/NzbDrone.Core/Parser/IsoLanguages.cs @@ -55,7 +55,7 @@ namespace NzbDrone.Core.Parser if (langCode.Length == 2) { - //Lookup ISO639-1 code + // Lookup ISO639-1 code var isoLanguages = All.Where(l => l.TwoLetterCode == langCode).ToList(); if (isoArray.Length > 1) @@ -68,7 +68,7 @@ namespace NzbDrone.Core.Parser } else if (langCode.Length == 3) { - //Lookup ISO639-2T code + // Lookup ISO639-2T code if (FileNameBuilder.Iso639BTMap.TryGetValue(langCode, out var mapped)) { langCode = mapped; diff --git a/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs b/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs index 9b9aeeeb6..11e8b56c7 100644 --- a/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs +++ b/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs @@ -32,8 +32,8 @@ namespace NzbDrone.Core.Parser.Model { get { return DateTime.UtcNow.Subtract(PublishDate).Days; } - //This prevents manually downloading a release from blowing up in mono - //TODO: Is there a better way? + // This prevents manually downloading a release from blowing up in mono + // TODO: Is there a better way? private set { } } @@ -41,8 +41,8 @@ namespace NzbDrone.Core.Parser.Model { get { return DateTime.UtcNow.Subtract(PublishDate).TotalHours; } - //This prevents manually downloading a release from blowing up in mono - //TODO: Is there a better way? + // This prevents manually downloading a release from blowing up in mono + // TODO: Is there a better way? private set { } } @@ -50,8 +50,8 @@ namespace NzbDrone.Core.Parser.Model { get { return DateTime.UtcNow.Subtract(PublishDate).TotalMinutes; } - //This prevents manually downloading a release from blowing up in mono - //TODO: Is there a better way? + // This prevents manually downloading a release from blowing up in mono + // TODO: Is there a better way? private set { } } @@ -87,16 +87,16 @@ namespace NzbDrone.Core.Parser.Model [Flags] public enum IndexerFlags { - G_Freeleech = 1, //General - G_Halfleech = 2, //General, only 1/2 of download counted - G_DoubleUpload = 4, //General - PTP_Golden = 8, //PTP - PTP_Approved = 16, //PTP - HDB_Internal = 32, //HDBits, internal + G_Freeleech = 1, // General + G_Halfleech = 2, // General, only 1/2 of download counted + G_DoubleUpload = 4, // General + PTP_Golden = 8, // PTP + PTP_Approved = 16, // PTP + HDB_Internal = 32, // HDBits, internal AHD_Internal = 64, // AHD, internal - G_Scene = 128, //General, the torrent comes from the "scene" - G_Freeleech75 = 256, //Currently only used for AHD, signifies a torrent counts towards 75 percent of your download quota. - G_Freeleech25 = 512, //Currently only used for AHD, signifies a torrent counts towards 25 percent of your download quota. + G_Scene = 128, // General, the torrent comes from the "scene" + G_Freeleech75 = 256, // Currently only used for AHD, signifies a torrent counts towards 75 percent of your download quota. + G_Freeleech25 = 512, // Currently only used for AHD, signifies a torrent counts towards 25 percent of your download quota. AHD_UserRelease = 1024 // AHD, internal } } diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 91d241649..e3e0cef9c 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -22,45 +22,45 @@ namespace NzbDrone.Core.Parser private static readonly Regex[] ReportMovieTitleRegex = new[] { - //Anime [Subgroup] and Year + // Anime [Subgroup] and Year new Regex(@"^(?:\[(?.+?)\][-_. ]?)(?(?![(\[]).+?)?(?:(?:[-_\W](?<![)\[!]))*(?<year>(1(8|9)|20)\d{2}(?!p|i|x|\d+|\]|\W\d+)))+.*?(?<hash>\[\w{8}\])?(?:$|\.)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Anime [Subgroup] no year, versioned title, hash + // Anime [Subgroup] no year, versioned title, hash new Regex(@"^(?:\[(?<subgroup>.+?)\][-_. ]?)(?<title>(?![(\[]).+?)((v)(?:\d{1,2})(?:([-_. ])))(\[.*)?(?:[\[(][^])])?.*?(?<hash>\[\w{8}\])(?:$|\.)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Anime [Subgroup] no year, info in double sets of brackets, hash + // Anime [Subgroup] no year, info in double sets of brackets, hash new Regex(@"^(?:\[(?<subgroup>.+?)\][-_. ]?)(?<title>(?![(\[]).+?)(\[.*).*?(?<hash>\[\w{8}\])(?:$|\.)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Anime [Subgroup] no year, info in parentheses or brackets, hash + // Anime [Subgroup] no year, info in parentheses or brackets, hash new Regex(@"^(?:\[(?<subgroup>.+?)\][-_. ]?)(?<title>(?![(\[]).+)(?:[\[(][^])]).*?(?<hash>\[\w{8}\])(?:$|\.)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Some german or french tracker formats (missing year, ...) (Only applies to german and TrueFrench releases) - see ParserFixture for examples and tests - french removed as it broke all movies w/ french titles + // Some german or french tracker formats (missing year, ...) (Only applies to german and TrueFrench releases) - see ParserFixture for examples and tests - french removed as it broke all movies w/ french titles new Regex(@"^(?<title>(?![(\[]).+?)((\W|_))(" + EditionRegex + @".{1,3})?(?:(?<!(19|20)\d{2}.*?)(German|TrueFrench))(.+?)(?=((19|20)\d{2}|$))(?<year>(19|20)\d{2}(?!p|i|\d+|\]|\W\d+))?(\W+|_|$)(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Special, Despecialized, etc. Edition Movies, e.g: Mission.Impossible.3.Special.Edition.2011 + // Special, Despecialized, etc. Edition Movies, e.g: Mission.Impossible.3.Special.Edition.2011 new Regex(@"^(?<title>(?![(\[]).+?)?(?:(?:[-_\W](?<![)\[!]))*" + EditionRegex + @".{1,3}(?<year>(1(8|9)|20)\d{2}(?!p|i|\d+|\]|\W\d+)))+(\W+|_|$)(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Special, Despecialized, etc. Edition Movies, e.g: Mission.Impossible.3.2011.Special.Edition //TODO: Seems to slow down parsing heavily! + // Special, Despecialized, etc. Edition Movies, e.g: Mission.Impossible.3.2011.Special.Edition //TODO: Seems to slow down parsing heavily! /*new Regex(@"^(?<title>(?![(\[]).+?)?(?:(?:[-_\W](?<![)\[!]))*(?<year>(19|20)\d{2}(?!p|i|(19|20)\d{2}|\]|\W(19|20)\d{2})))+(\W+|_|$)(?!\\)\(?(?<edition>(((Extended.|Ultimate.)?(Director.?s|Collector.?s|Theatrical|Ultimate|Final(?=(.(Cut|Edition|Version)))|Extended|Rogue|Special|Despecialized|\d{2,3}(th)?.Anniversary)(.(Cut|Edition|Version))?(.(Extended|Uncensored|Remastered|Unrated|Uncut|IMAX|Fan.?Edit))?|((Uncensored|Remastered|Unrated|Uncut|IMAX|Fan.?Edit|Edition|Restored|((2|3|4)in1))))))\)?", RegexOptions.IgnoreCase | RegexOptions.Compiled),*/ - //Normal movie format, e.g: Mission.Impossible.3.2011 + // Normal movie format, e.g: Mission.Impossible.3.2011 new Regex(@"^(?<title>(?![(\[]).+?)?(?:(?:[-_\W](?<![)\[!]))*(?<year>(1(8|9)|20)\d{2}(?!p|i|(1(8|9)|20)\d{2}|\]|\W(1(8|9)|20)\d{2})))+(\W+|_|$)(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //PassThePopcorn Torrent names: Star.Wars[PassThePopcorn] + // PassThePopcorn Torrent names: Star.Wars[PassThePopcorn] new Regex(@"^(?<title>.+?)?(?:(?:[-_\W](?<![()\[!]))*(?<year>(\[\w *\])))+(\W+|_|$)(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //That did not work? Maybe some tool uses [] for years. Who would do that? + // That did not work? Maybe some tool uses [] for years. Who would do that? new Regex(@"^(?<title>(?![(\[]).+?)?(?:(?:[-_\W](?<![)!]))*(?<year>(1(8|9)|20)\d{2}(?!p|i|\d+|\W\d+)))+(\W+|_|$)(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //As a last resort for movies that have ( or [ in their title. + // As a last resort for movies that have ( or [ in their title. new Regex(@"^(?<title>.+?)?(?:(?:[-_\W](?<![)\[!]))*(?<year>(1(8|9)|20)\d{2}(?!p|i|\d+|\]|\W\d+)))+(\W+|_|$)(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled) }; private static readonly Regex[] ReportMovieTitleFolderRegex = new[] { - //When year comes first. + // When year comes first. new Regex(@"^(?:(?:[-_\W](?<![)!]))*(?<year>(19|20)\d{2}(?!p|i|\d+|\W\d+)))+(\W+|_|$)(?<title>.+?)?$") }; @@ -77,26 +77,26 @@ namespace NzbDrone.Core.Parser new Regex(@"^[A-Z]{11}\d{3}$", RegexOptions.Compiled), new Regex(@"^[a-z]{12}\d{3}$", RegexOptions.Compiled), - //Backup filename (Unknown origins) + // Backup filename (Unknown origins) new Regex(@"^Backup_\d{5,}S\d{2}-\d{2}$", RegexOptions.Compiled), - //123 - Started appearing December 2014 + // 123 - Started appearing December 2014 new Regex(@"^123$", RegexOptions.Compiled), - //abc - Started appearing January 2015 + // abc - Started appearing January 2015 new Regex(@"^abc$", RegexOptions.Compiled | RegexOptions.IgnoreCase), - //abc - Started appearing 2020 + // abc - Started appearing 2020 new Regex(@"^abc[-_. ]xyz", RegexOptions.Compiled | RegexOptions.IgnoreCase), - //b00bs - Started appearing January 2015 + // b00bs - Started appearing January 2015 new Regex(@"^b00bs$", RegexOptions.Compiled | RegexOptions.IgnoreCase) }; - //Regex to detect whether the title was reversed. + // Regex to detect whether the title was reversed. private static readonly Regex ReversedTitleRegex = new Regex(@"(?:^|[-._ ])(p027|p0801)[-._ ]", RegexOptions.Compiled); - //Regex to split movie titles that contain `AKA`. + // Regex to split movie titles that contain `AKA`. private static readonly Regex AlternativeTitleRegex = new Regex(@"[ ]+AKA[ ]+", RegexOptions.IgnoreCase | RegexOptions.Compiled); // Regex to unbracket alternative titles. @@ -147,11 +147,11 @@ namespace NzbDrone.Core.Parser private static readonly Regex YearInTitleRegex = new Regex(@"^(?<title>.+?)(?:\W|_)?(?<year>\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled); - //Handle Exception Release Groups that don't follow -RlsGrp; Manual List - //groups whose releases end with RlsGroup) or RlsGroup] + // Handle Exception Release Groups that don't follow -RlsGrp; Manual List + // groups whose releases end with RlsGroup) or RlsGroup] private static readonly Regex ExceptionReleaseGroupRegex = new Regex(@"(?<releasegroup>(Joy|YIFY|YTS.(MX|LT|AG)|FreetheFish|afm72|Anna|Bandi|Ghost|Kappa|MONOLITH|Qman|RZeroX|SAMPA|Silence|theincognito|t3nzin|Vyndros|HDO|DusIctv|DHD|SEV|CtrlHD|-ZR-|ADC|XZVN|RH|Kametsu|r00t|HONE)(?=\]|\)))", RegexOptions.IgnoreCase | RegexOptions.Compiled); - //Handle Exception Release Groups that don't follow -RlsGrp; Manual List + // Handle Exception Release Groups that don't follow -RlsGrp; Manual List // name only...BE VERY CAREFUL WITH THIS, HIGH CHANCE OF FALSE POSITIVES private static readonly Regex ExceptionReleaseGroupRegexExact = new Regex(@"(?<releasegroup>KRaLiMaRKo|E\.N\.D|D\-Z0N3|Koten_Gars|BluDragon|ZØNEHD|Tigole|HQMUX)", RegexOptions.IgnoreCase | RegexOptions.Compiled); @@ -217,7 +217,7 @@ namespace NzbDrone.Core.Parser var releaseTitle = RemoveFileExtension(title); - //Trim dashes from end + // Trim dashes from end releaseTitle = releaseTitle.Trim('-', '_'); releaseTitle = releaseTitle.Replace("【", "[").Replace("】", "]"); @@ -269,7 +269,7 @@ namespace NzbDrone.Core.Parser if (result != null) { - //TODO: Add tests for this! + // TODO: Add tests for this! var simpleReleaseTitle = SimpleReleaseTitleRegex.Replace(releaseTitle, string.Empty); var simpleTitleReplaceString = match[0].Groups["title"].Success ? match[0].Groups["title"].Value : result.PrimaryMovieTitle; @@ -422,28 +422,28 @@ namespace NzbDrone.Core.Parser public static string ToUrlSlug(string value, bool invalidDashReplacement = false, string trimEndChars = "-_", string deduplicateChars = "-_") { - //First to lower case + // First to lower case value = value.ToLowerInvariant(); - //Remove all accents + // Remove all accents value = value.RemoveAccent(); - //Replace spaces + // Replace spaces value = Regex.Replace(value, @"\s", "-", RegexOptions.Compiled); - //Should invalid characters be replaced with dash or empty string? + // Should invalid characters be replaced with dash or empty string? string replaceCharacter = invalidDashReplacement ? "-" : string.Empty; - //Remove invalid chars + // Remove invalid chars value = Regex.Replace(value, @"[^a-z0-9\s-_]", replaceCharacter, RegexOptions.Compiled); - //Trim dashes or underscores from end, or user defined character set + // Trim dashes or underscores from end, or user defined character set if (!string.IsNullOrEmpty(trimEndChars)) { value = value.Trim(trimEndChars.ToCharArray()); } - //Replace double occurrences of - or _, or user defined character set + // Replace double occurrences of - or _, or user defined character set if (!string.IsNullOrEmpty(deduplicateChars)) { value = Regex.Replace(value, @"([" + deduplicateChars + "]){2,}", "$1", RegexOptions.Compiled); @@ -456,7 +456,7 @@ namespace NzbDrone.Core.Parser { long number = 0; - //If Title only contains numbers return it as is. + // If Title only contains numbers return it as is. if (long.TryParse(title, out number)) { return title; @@ -633,10 +633,10 @@ namespace NzbDrone.Core.Parser var movieTitles = new List<string>(); movieTitles.Add(movieName); - //Delete parentheses of the form (aka ...). + // Delete parentheses of the form (aka ...). var unbracketedName = BracketedAlternativeTitleRegex.Replace(movieName, "$1 AKA $2"); - //Split by AKA and filter out empty and duplicate names. + // Split by AKA and filter out empty and duplicate names. movieTitles .AddRange(AlternativeTitleRegex .Split(unbracketedName) diff --git a/src/NzbDrone.Core/Parser/ParsingService.cs b/src/NzbDrone.Core/Parser/ParsingService.cs index 3747feadc..0b7ae775e 100644 --- a/src/NzbDrone.Core/Parser/ParsingService.cs +++ b/src/NzbDrone.Core/Parser/ParsingService.cs @@ -127,7 +127,7 @@ namespace NzbDrone.Core.Parser result.Movie = null; } - //Use movie language as fallback if we could't parse a language (more accurate than just using English) + // Use movie language as fallback if we could't parse a language (more accurate than just using English) if (parsedMovieInfo.Languages.Count <= 1 && parsedMovieInfo.Languages.First() == Language.Unknown && result.Movie != null) { parsedMovieInfo.Languages = new List<Language> { result.Movie.MovieMetadata.Value.OriginalLanguage }; @@ -189,7 +189,7 @@ namespace NzbDrone.Core.Parser { var movie = _movieService.FindByImdbId(imdbId); - //Should fix practically all problems, where indexer is shite at adding correct imdbids to movies. + // Should fix practically all problems, where indexer is shite at adding correct imdbids to movies. if (movie != null && parsedMovieInfo.Year > 1800 && (parsedMovieInfo.Year != movie.MovieMetadata.Value.Year && movie.MovieMetadata.Value.SecondaryYear != parsedMovieInfo.Year)) { result = new MappingResult { Movie = movie, MappingResultType = MappingResultType.WrongYear }; @@ -272,7 +272,7 @@ namespace NzbDrone.Core.Parser var arabicNumeral = numeralMapping.ArabicNumeralAsString; var romanNumeral = numeralMapping.RomanNumeralLowerCase; - //_logger.Debug(cleanTitle); + // _logger.Debug(cleanTitle); if (title.Replace(arabicNumeral, romanNumeral) == cleanTitle) { possibleMovie = searchCriteria.Movie; diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index 8a4532bd9..7f7bbf0d1 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -59,7 +59,7 @@ namespace NzbDrone.Core.Parser private static readonly Regex ResolutionRegex = new Regex(@"\b(?:(?<R360p>360p)|(?<R480p>480p|640x480|848x480)|(?<R540p>540p)|(?<R576p>576p)|(?<R720p>720p|1280x720|960p)|(?<R1080p>1080p|1920x1080|1440p|FHD|1080i|4kto1080p)|(?<R2160p>2160p|3840x2160|4k[-_. ](?:UHD|HEVC|BD|H265)|(?:UHD|HEVC|BD|H265)[-_. ]4k))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); - //Handle cases where no resolution is in the release name; assume if UHD then 4k + // Handle cases where no resolution is in the release name; assume if UHD then 4k private static readonly Regex ImpliedResolutionRegex = new Regex(@"\b(?<R2160p>UHD)\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); diff --git a/src/NzbDrone.Core/Parser/SceneChecker.cs b/src/NzbDrone.Core/Parser/SceneChecker.cs index 3cc5c7ef0..9b3bfc9ac 100644 --- a/src/NzbDrone.Core/Parser/SceneChecker.cs +++ b/src/NzbDrone.Core/Parser/SceneChecker.cs @@ -2,8 +2,8 @@ namespace NzbDrone.Core.Parser { public static class SceneChecker { - //This method should prefer false negatives over false positives. - //It's better not to use a title that might be scene than to use one that isn't scene + // This method should prefer false negatives over false positives. + // It's better not to use a title that might be scene than to use one that isn't scene public static string GetSceneTitle(string title) { if (title == null) diff --git a/src/NzbDrone.Core/Qualities/QualityFinder.cs b/src/NzbDrone.Core/Qualities/QualityFinder.cs index 2c5638894..8ba5317cc 100644 --- a/src/NzbDrone.Core/Qualities/QualityFinder.cs +++ b/src/NzbDrone.Core/Qualities/QualityFinder.cs @@ -38,7 +38,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/RootFolders/RootFolderService.cs b/src/NzbDrone.Core/RootFolders/RootFolderService.cs index 68286c17a..b9c42fde4 100644 --- a/src/NzbDrone.Core/RootFolders/RootFolderService.cs +++ b/src/NzbDrone.Core/RootFolders/RootFolderService.cs @@ -79,7 +79,7 @@ namespace NzbDrone.Core.RootFolders } } - //We don't want an exception to prevent the root folders from loading in the UI, so they can still be deleted + // We don't want an exception to prevent the root folders from loading in the UI, so they can still be deleted catch (Exception ex) { _logger.Error(ex, "Unable to get free space and unmapped folders for root folder {0}", folder.Path); diff --git a/src/NzbDrone.Core/ThingiProvider/IProviderRepository.cs b/src/NzbDrone.Core/ThingiProvider/IProviderRepository.cs index 421cc6899..7686eece1 100644 --- a/src/NzbDrone.Core/ThingiProvider/IProviderRepository.cs +++ b/src/NzbDrone.Core/ThingiProvider/IProviderRepository.cs @@ -5,6 +5,6 @@ namespace NzbDrone.Core.ThingiProvider public interface IProviderRepository<TProvider> : IBasicRepository<TProvider> where TProvider : ModelBase, new() { - // void DeleteImplementations(string implementation); + // void DeleteImplementations(string implementation); } } diff --git a/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs b/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs index c1a93c019..4bec1fee7 100644 --- a/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs +++ b/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs @@ -168,7 +168,7 @@ namespace NzbDrone.Core.ThingiProvider definition.Message = provider.Message; } - //TODO: Remove providers even if the ConfigContract can't be deserialized (this will fail to remove providers if the settings can't be deserialized). + // TODO: Remove providers even if the ConfigContract can't be deserialized (this will fail to remove providers if the settings can't be deserialized). private void RemoveMissingImplementations() { var storedProvider = _providerRepository.All(); diff --git a/src/NzbDrone.Host/AccessControl/FirewallAdapter.cs b/src/NzbDrone.Host/AccessControl/FirewallAdapter.cs index d8d45cf97..c8cb0f8f1 100644 --- a/src/NzbDrone.Host/AccessControl/FirewallAdapter.cs +++ b/src/NzbDrone.Host/AccessControl/FirewallAdapter.cs @@ -77,7 +77,7 @@ namespace NzbDrone.Host.AccessControl var netFwMgrType = Type.GetTypeFromProgID("HNetCfg.FwMgr", false); var mgr = (INetFwMgr)Activator.CreateInstance(netFwMgrType); - //Open the port for the standard profile, should help when the user has multiple network adapters + // Open the port for the standard profile, should help when the user has multiple network adapters mgr.LocalPolicy.GetProfileByType(FIREWALL_PROFILE).GloballyOpenPorts.Add(port); } catch (Exception ex) diff --git a/src/NzbDrone.Integration.Test/ApiTests/ReleaseFixture.cs b/src/NzbDrone.Integration.Test/ApiTests/ReleaseFixture.cs index 0f75ef068..8c4fdfb3f 100644 --- a/src/NzbDrone.Integration.Test/ApiTests/ReleaseFixture.cs +++ b/src/NzbDrone.Integration.Test/ApiTests/ReleaseFixture.cs @@ -36,8 +36,8 @@ namespace NzbDrone.Integration.Test.ApiTests // InternalServerError is caused by the Release being invalid for download (no Series). // 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); + // var result = Releases.Post(new ReleaseResource { Guid = releases.First().Guid }); + // result.Guid.Should().Be(releases.First().Guid); var result = Releases.Post(new ReleaseResource { Guid = releases.First().Guid }, HttpStatusCode.InternalServerError); } @@ -49,9 +49,9 @@ namespace NzbDrone.Integration.Test.ApiTests releaseResource.DownloadUrl.Should().NotBeNullOrWhiteSpace(); releaseResource.MovieTitles.First().Should().NotBeNullOrWhiteSpace(); - //TODO: uncomment these after moving to restsharp for rss - //releaseResource.NzbInfoUrl.Should().NotBeNullOrWhiteSpace(); - //releaseResource.Size.Should().BeGreaterThan(0); + // TODO: uncomment these after moving to restsharp for rss + // releaseResource.NzbInfoUrl.Should().NotBeNullOrWhiteSpace(); + // releaseResource.Size.Should().BeGreaterThan(0); return true; } } diff --git a/src/NzbDrone.Integration.Test/IntegrationTestBase.cs b/src/NzbDrone.Integration.Test/IntegrationTestBase.cs index d7b6eb6a7..92b8fec7d 100644 --- a/src/NzbDrone.Integration.Test/IntegrationTestBase.cs +++ b/src/NzbDrone.Integration.Test/IntegrationTestBase.cs @@ -289,7 +289,7 @@ namespace NzbDrone.Integration.Test var sourcePath = Path.Combine(TestContext.CurrentContext.TestDirectory, "ApiTests", "Files", "H264_sample.mp4"); - //File.Copy(sourcePath, path); + // File.Copy(sourcePath, path); File.WriteAllText(path, "Fake Movie"); Commands.PostAndWait(new RefreshMovieCommand(new List<int> { movie.Id })); diff --git a/src/NzbDrone.Test.Common/LoggingTest.cs b/src/NzbDrone.Test.Common/LoggingTest.cs index 4f837f9f9..092c3a98e 100644 --- a/src/NzbDrone.Test.Common/LoggingTest.cs +++ b/src/NzbDrone.Test.Common/LoggingTest.cs @@ -95,8 +95,8 @@ namespace NzbDrone.Test.Common [TearDown] public void LoggingDownBase() { - //can't use because of a bug in mono with 2.6.2, - //https://bugs.launchpad.net/nunitv2/+bug/1076932 + // can't use because of a bug in mono with 2.6.2, + // https://bugs.launchpad.net/nunitv2/+bug/1076932 if (BuildInfo.IsDebug && TestContext.CurrentContext.Result.Outcome == ResultState.Success) { ExceptionVerification.AssertNoUnexpectedLogs(); diff --git a/src/NzbDrone.Update/UpdateEngine/BackupAppData.cs b/src/NzbDrone.Update/UpdateEngine/BackupAppData.cs index 991c7d6c1..b57c3b89e 100644 --- a/src/NzbDrone.Update/UpdateEngine/BackupAppData.cs +++ b/src/NzbDrone.Update/UpdateEngine/BackupAppData.cs @@ -47,7 +47,7 @@ namespace NzbDrone.Update.UpdateEngine { _diskTransferService.TransferFile(_appFolderInfo.GetConfigPath(), _appFolderInfo.GetUpdateBackupConfigFile(), TransferMode.Copy); - //Backup new db if exists, else try old then fail + // Backup new db if exists, else try old then fail if (_diskProvider.FileExists(_appFolderInfo.GetDatabase())) { _diskTransferService.TransferFile(_appFolderInfo.GetDatabase(), _appFolderInfo.GetUpdateBackupDatabase(), TransferMode.Copy); diff --git a/src/Radarr.Api.V3/Config/HostConfigResource.cs b/src/Radarr.Api.V3/Config/HostConfigResource.cs index d563df4f8..5588ded79 100644 --- a/src/Radarr.Api.V3/Config/HostConfigResource.cs +++ b/src/Radarr.Api.V3/Config/HostConfigResource.cs @@ -59,8 +59,8 @@ namespace Radarr.Api.V3.Config AuthenticationMethod = model.AuthenticationMethod, AnalyticsEnabled = model.AnalyticsEnabled, - //Username - //Password + // Username + // Password LogLevel = model.LogLevel, ConsoleLogLevel = model.ConsoleLogLevel, Branch = model.Branch, diff --git a/src/Radarr.Api.V3/Config/NamingExampleResource.cs b/src/Radarr.Api.V3/Config/NamingExampleResource.cs index 597a6e2bb..37d636f46 100644 --- a/src/Radarr.Api.V3/Config/NamingExampleResource.cs +++ b/src/Radarr.Api.V3/Config/NamingExampleResource.cs @@ -22,10 +22,10 @@ namespace Radarr.Api.V3.Config StandardMovieFormat = model.StandardMovieFormat, MovieFolderFormat = model.MovieFolderFormat, - //IncludeQuality - //ReplaceSpaces - //Separator - //NumberStyle + // IncludeQuality + // ReplaceSpaces + // Separator + // NumberStyle }; } diff --git a/src/Radarr.Api.V3/Config/UiConfigResource.cs b/src/Radarr.Api.V3/Config/UiConfigResource.cs index bb1fef871..3c012337c 100644 --- a/src/Radarr.Api.V3/Config/UiConfigResource.cs +++ b/src/Radarr.Api.V3/Config/UiConfigResource.cs @@ -5,14 +5,14 @@ namespace Radarr.Api.V3.Config { public class UiConfigResource : RestResource { - //Calendar + // Calendar public int FirstDayOfWeek { get; set; } public string CalendarWeekColumnHeader { get; set; } // Movies public MovieRuntimeFormatType MovieRuntimeFormat { get; set; } - //Dates + // Dates public string ShortDateFormat { get; set; } public string LongDateFormat { get; set; } public string TimeFormat { get; set; } diff --git a/src/Radarr.Api.V3/FileSystem/FileSystemController.cs b/src/Radarr.Api.V3/FileSystem/FileSystemController.cs index 6329031f0..80fb1b8b8 100644 --- a/src/Radarr.Api.V3/FileSystem/FileSystemController.cs +++ b/src/Radarr.Api.V3/FileSystem/FileSystemController.cs @@ -39,7 +39,7 @@ namespace Radarr.Api.V3.FileSystem return new { type = "file" }; } - //Return folder even if it doesn't exist on disk to avoid leaking anything from the UI about the underlying system + // Return folder even if it doesn't exist on disk to avoid leaking anything from the UI about the underlying system return new { type = "folder" }; } diff --git a/src/Radarr.Api.V3/History/HistoryResource.cs b/src/Radarr.Api.V3/History/HistoryResource.cs index 50faa1b91..9f744dc44 100644 --- a/src/Radarr.Api.V3/History/HistoryResource.cs +++ b/src/Radarr.Api.V3/History/HistoryResource.cs @@ -47,7 +47,7 @@ namespace Radarr.Api.V3.History Quality = model.Quality, CustomFormats = formatCalculator.ParseCustomFormat(model).ToResource(), - //QualityCutoffNotMet + // QualityCutoffNotMet Date = model.Date, DownloadId = model.DownloadId, diff --git a/src/Radarr.Api.V3/ImportLists/ImportExclusionsResource.cs b/src/Radarr.Api.V3/ImportLists/ImportExclusionsResource.cs index 6a40c26b8..ac8f48304 100644 --- a/src/Radarr.Api.V3/ImportLists/ImportExclusionsResource.cs +++ b/src/Radarr.Api.V3/ImportLists/ImportExclusionsResource.cs @@ -6,7 +6,7 @@ namespace Radarr.Api.V3.ImportLists { public class ImportExclusionsResource : ProviderResource<ImportExclusionsResource> { - //public int Id { get; set; } + // public int Id { get; set; } public int TmdbId { get; set; } public string MovieTitle { get; set; } public int MovieYear { get; set; } diff --git a/src/Radarr.Api.V3/ImportLists/ImportListMoviesController.cs b/src/Radarr.Api.V3/ImportLists/ImportListMoviesController.cs index c68452dc7..64e462681 100644 --- a/src/Radarr.Api.V3/ImportLists/ImportListMoviesController.cs +++ b/src/Radarr.Api.V3/ImportLists/ImportListMoviesController.cs @@ -106,7 +106,7 @@ namespace Radarr.Api.V3.ImportLists private IEnumerable<ImportListMoviesResource> MapToResource(IEnumerable<Movie> movies, Language language) { - //Avoid calling for naming spec on every movie in filenamebuilder + // Avoid calling for naming spec on every movie in filenamebuilder var namingConfig = _namingService.GetConfig(); foreach (var currentMovie in movies) diff --git a/src/Radarr.Api.V3/Indexers/ReleaseResource.cs b/src/Radarr.Api.V3/Indexers/ReleaseResource.cs index e9814bbc9..a6a0eeee4 100644 --- a/src/Radarr.Api.V3/Indexers/ReleaseResource.cs +++ b/src/Radarr.Api.V3/Indexers/ReleaseResource.cs @@ -76,7 +76,7 @@ namespace Radarr.Api.V3.Indexers CustomFormats = remoteMovie.CustomFormats.ToResource(), CustomFormatScore = remoteMovie.CustomFormatScore, - //QualityWeight + // QualityWeight Age = releaseInfo.Age, AgeHours = releaseInfo.AgeHours, AgeMinutes = releaseInfo.AgeMinutes, @@ -101,7 +101,7 @@ namespace Radarr.Api.V3.Indexers DownloadAllowed = remoteMovie.DownloadAllowed, Edition = parsedMovieInfo.Edition, - //ReleaseWeight + // ReleaseWeight MagnetUrl = torrentInfo.MagnetUrl, InfoHash = torrentInfo.InfoHash, Seeders = torrentInfo.Seeders, diff --git a/src/Radarr.Api.V3/ManualImport/ManualImportResource.cs b/src/Radarr.Api.V3/ManualImport/ManualImportResource.cs index 63c698c77..b048370c8 100644 --- a/src/Radarr.Api.V3/ManualImport/ManualImportResource.cs +++ b/src/Radarr.Api.V3/ManualImport/ManualImportResource.cs @@ -48,7 +48,7 @@ namespace Radarr.Api.V3.ManualImport Languages = model.Languages, ReleaseGroup = model.ReleaseGroup, - //QualityWeight + // QualityWeight DownloadId = model.DownloadId, Rejections = model.Rejections }; diff --git a/src/Radarr.Api.V3/MovieFiles/MovieFileResource.cs b/src/Radarr.Api.V3/MovieFiles/MovieFileResource.cs index d71b3cdc7..06bc5333c 100644 --- a/src/Radarr.Api.V3/MovieFiles/MovieFileResource.cs +++ b/src/Radarr.Api.V3/MovieFiles/MovieFileResource.cs @@ -46,7 +46,7 @@ namespace Radarr.Api.V3.MovieFiles MovieId = model.MovieId, RelativePath = model.RelativePath, - //Path + // Path Size = model.Size, DateAdded = model.DateAdded, SceneName = model.SceneName, diff --git a/src/Radarr.Api.V3/Movies/AlternativeTitleResource.cs b/src/Radarr.Api.V3/Movies/AlternativeTitleResource.cs index fee73c35d..1456ee888 100644 --- a/src/Radarr.Api.V3/Movies/AlternativeTitleResource.cs +++ b/src/Radarr.Api.V3/Movies/AlternativeTitleResource.cs @@ -12,9 +12,9 @@ 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 + // 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 public SourceType SourceType { get; set; } public int MovieMetadataId { get; set; } public string Title { get; set; } @@ -24,7 +24,7 @@ namespace Radarr.Api.V3.Movies public int VoteCount { get; set; } public Language Language { get; set; } - //TODO: Add series statistics as a property of the series (instead of individual properties) + // TODO: Add series statistics as a property of the series (instead of individual properties) } public static class AlternativeTitleResourceMapper diff --git a/src/Radarr.Api.V3/Movies/MovieResource.cs b/src/Radarr.Api.V3/Movies/MovieResource.cs index 04290958c..d9d8f3cf7 100644 --- a/src/Radarr.Api.V3/Movies/MovieResource.cs +++ b/src/Radarr.Api.V3/Movies/MovieResource.cs @@ -21,11 +21,11 @@ namespace Radarr.Api.V3.Movies MinimumAvailability = MovieStatusType.Released; } - //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 + // 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 + // View Only public string Title { get; set; } public string OriginalTitle { get; set; } public Language OriginalLanguage { get; set; } @@ -43,18 +43,18 @@ namespace Radarr.Api.V3.Movies public List<MediaCover> Images { get; set; } public string Website { get; set; } - //public bool Downloaded { get; set; } + // public bool Downloaded { get; set; } public string RemotePoster { get; set; } public int Year { get; set; } public bool HasFile { get; set; } public string YouTubeTrailerId { get; set; } public string Studio { get; set; } - //View & Edit + // View & Edit public string Path { get; set; } public int QualityProfileId { get; set; } - //Editing Only + // Editing Only public bool Monitored { get; set; } public MovieStatusType MinimumAvailability { get; set; } public bool IsAvailable { get; set; } diff --git a/src/Radarr.Api.V3/ProviderResource.cs b/src/Radarr.Api.V3/ProviderResource.cs index 75be400ac..e5e201a26 100644 --- a/src/Radarr.Api.V3/ProviderResource.cs +++ b/src/Radarr.Api.V3/ProviderResource.cs @@ -38,7 +38,7 @@ namespace Radarr.Api.V3 Tags = definition.Tags, Fields = SchemaBuilder.ToSchema(definition.Settings), - //radarr/supported is an disambagation page. the # should be a header on the page with appropiate details/link + // radarr/supported is an disambagation page. the # should be a header on the page with appropiate details/link InfoLink = string.Format("https://wiki.servarr.com/radarr/supported#{0}", definition.Implementation.ToLower()) }; diff --git a/src/Radarr.Api.V3/RootFolders/RootFolderResource.cs b/src/Radarr.Api.V3/RootFolders/RootFolderResource.cs index 88c97df63..4ac55cd83 100644 --- a/src/Radarr.Api.V3/RootFolders/RootFolderResource.cs +++ b/src/Radarr.Api.V3/RootFolders/RootFolderResource.cs @@ -48,9 +48,9 @@ namespace Radarr.Api.V3.RootFolders Path = resource.Path - //Accessible - //FreeSpace - //UnmappedFolders + // Accessible + // FreeSpace + // UnmappedFolders }; } diff --git a/src/Radarr.Api.V3/Update/UpdateResource.cs b/src/Radarr.Api.V3/Update/UpdateResource.cs index 178857a5c..cf1c8ae29 100644 --- a/src/Radarr.Api.V3/Update/UpdateResource.cs +++ b/src/Radarr.Api.V3/Update/UpdateResource.cs @@ -40,9 +40,9 @@ namespace Radarr.Api.V3.Update FileName = model.FileName, Url = model.Url, - //Installed - //Installable - //Latest + // Installed + // Installable + // Latest Changes = model.Changes, Hash = model.Hash, }; diff --git a/src/Radarr.Http/Extensions/RequestExtensions.cs b/src/Radarr.Http/Extensions/RequestExtensions.cs index f33d43c64..736f4fda7 100644 --- a/src/Radarr.Http/Extensions/RequestExtensions.cs +++ b/src/Radarr.Http/Extensions/RequestExtensions.cs @@ -15,7 +15,7 @@ namespace Radarr.Http.Extensions // See src/Readarr.Api.V1/Queue/QueueModule.cs private static readonly HashSet<string> VALID_SORT_KEYS = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { - "movies.sortname", //Workaround authors table properties not being added on isValidSortKey call + "movies.sortname", // Workaround authors table properties not being added on isValidSortKey call "timeleft", "estimatedCompletionTime", "protocol",