diff --git a/.editorconfig b/.editorconfig index 1cdc7b36e..b208caf04 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/Lidarr.Api.V1/Albums/AlbumResource.cs b/src/Lidarr.Api.V1/Albums/AlbumResource.cs index 92ced5726..06548e334 100644 --- a/src/Lidarr.Api.V1/Albums/AlbumResource.cs +++ b/src/Lidarr.Api.V1/Albums/AlbumResource.cs @@ -47,7 +47,7 @@ namespace Lidarr.Api.V1.Albums public AddAlbumOptions AddOptions { get; set; } public string RemoteCover { get; set; } - //Hiding this so people don't think its usable (only used to set the initial state) + // Hiding this so people don't think its usable (only used to set the initial state) [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public bool Grabbed { get; set; } } diff --git a/src/Lidarr.Api.V1/Artist/ArtistController.cs b/src/Lidarr.Api.V1/Artist/ArtistController.cs index 1c185a35b..23b481451 100644 --- a/src/Lidarr.Api.V1/Artist/ArtistController.cs +++ b/src/Lidarr.Api.V1/Artist/ArtistController.cs @@ -117,7 +117,7 @@ namespace Lidarr.Api.V1.Artist FetchAndLinkArtistStatistics(resource); LinkNextPreviousAlbums(resource); - //PopulateAlternateTitles(resource); + // PopulateAlternateTitles(resource); LinkRootFolderPath(resource); return resource; @@ -143,7 +143,7 @@ namespace Lidarr.Api.V1.Artist LinkArtistStatistics(artistsResources, artistStats); artistsResources.ForEach(LinkRootFolderPath); - //PopulateAlternateTitles(seriesResources); + // PopulateAlternateTitles(seriesResources); return artistsResources; } @@ -235,22 +235,22 @@ namespace Lidarr.Api.V1.Artist resource.Statistics = artistStatistics.ToResource(); } - //private void PopulateAlternateTitles(List resources) - //{ + // private void PopulateAlternateTitles(List resources) + // { // foreach (var resource in resources) // { // PopulateAlternateTitles(resource); // } - //} + // } - //private void PopulateAlternateTitles(ArtistResource resource) - //{ + // private void PopulateAlternateTitles(ArtistResource resource) + // { // var mappings = _sceneMappingService.FindByTvdbId(resource.TvdbId); - // if (mappings == null) return; + // if (mappings == null) return; - // resource.AlternateTitles = mappings.Select(v => new AlternateTitleResource { Title = v.Title, SeasonNumber = v.SeasonNumber, SceneSeasonNumber = v.SceneSeasonNumber }).ToList(); - //} + // resource.AlternateTitles = mappings.Select(v => new AlternateTitleResource { Title = v.Title, SeasonNumber = v.SeasonNumber, SceneSeasonNumber = v.SceneSeasonNumber }).ToList(); + // } private void LinkRootFolderPath(ArtistResource resource) { resource.RootFolderPath = _rootFolderService.GetBestRootFolderPath(resource.Path); diff --git a/src/Lidarr.Api.V1/Artist/ArtistResource.cs b/src/Lidarr.Api.V1/Artist/ArtistResource.cs index 4d6977104..5797a3bfa 100644 --- a/src/Lidarr.Api.V1/Artist/ArtistResource.cs +++ b/src/Lidarr.Api.V1/Artist/ArtistResource.cs @@ -11,9 +11,9 @@ namespace Lidarr.Api.V1.Artist { public class ArtistResource : RestResource { - //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 [JsonIgnore] public int ArtistMetadataId { get; set; } public ArtistStatusType Status { get; set; } @@ -39,12 +39,12 @@ namespace Lidarr.Api.V1.Artist public string RemotePoster { get; set; } - //View & Edit + // View & Edit public string Path { get; set; } public int QualityProfileId { get; set; } public int MetadataProfileId { get; set; } - //Editing Only + // Editing Only public bool Monitored { get; set; } public NewItemMonitorTypes MonitorNewItems { get; set; } @@ -76,7 +76,7 @@ namespace Lidarr.Api.V1.Artist ArtistName = model.Name, - //AlternateTitles + // AlternateTitles SortName = model.SortName, Status = model.Metadata.Value.Status, @@ -133,7 +133,7 @@ namespace Lidarr.Api.V1.Artist Type = resource.ArtistType }, - //AlternateTitles + // AlternateTitles SortName = resource.SortName, Path = resource.Path, QualityProfileId = resource.QualityProfileId, diff --git a/src/Lidarr.Api.V1/Calendar/CalendarController.cs b/src/Lidarr.Api.V1/Calendar/CalendarController.cs index af29f0f31..d499607be 100644 --- a/src/Lidarr.Api.V1/Calendar/CalendarController.cs +++ b/src/Lidarr.Api.V1/Calendar/CalendarController.cs @@ -28,7 +28,7 @@ namespace Lidarr.Api.V1.Calendar [HttpGet] public List GetCalendar(DateTime? start, DateTime? end, bool unmonitored = false, bool includeArtist = false) { - //TODO: Add Album Image support to AlbumControllerWithSignalR + // TODO: Add Album Image support to AlbumControllerWithSignalR var includeAlbumImages = Request.GetBooleanQueryParameter("includeAlbumImages"); var startUse = start ?? DateTime.Today; diff --git a/src/Lidarr.Api.V1/Calendar/CalendarFeedController.cs b/src/Lidarr.Api.V1/Calendar/CalendarFeedController.cs index 89159a1fc..0637a0967 100644 --- a/src/Lidarr.Api.V1/Calendar/CalendarFeedController.cs +++ b/src/Lidarr.Api.V1/Calendar/CalendarFeedController.cs @@ -61,7 +61,7 @@ namespace Lidarr.Api.V1.Calendar var occurrence = calendar.Create(); occurrence.Uid = "Lidarr_album_" + album.Id; - //occurrence.Status = album.HasFile ? EventStatus.Confirmed : EventStatus.Tentative; + // occurrence.Status = album.HasFile ? EventStatus.Confirmed : EventStatus.Tentative; occurrence.Description = album.Overview; occurrence.Categories = album.Genres; diff --git a/src/Lidarr.Api.V1/Config/HostConfigResource.cs b/src/Lidarr.Api.V1/Config/HostConfigResource.cs index ba4504be8..cf0178018 100644 --- a/src/Lidarr.Api.V1/Config/HostConfigResource.cs +++ b/src/Lidarr.Api.V1/Config/HostConfigResource.cs @@ -59,8 +59,8 @@ namespace Lidarr.Api.V1.Config AuthenticationMethod = model.AuthenticationMethod, AnalyticsEnabled = model.AnalyticsEnabled, - //Username - //Password + // Username + // Password LogLevel = model.LogLevel, ConsoleLogLevel = model.ConsoleLogLevel, Branch = model.Branch, diff --git a/src/Lidarr.Api.V1/Config/UiConfigResource.cs b/src/Lidarr.Api.V1/Config/UiConfigResource.cs index d972ea390..de443c0e4 100644 --- a/src/Lidarr.Api.V1/Config/UiConfigResource.cs +++ b/src/Lidarr.Api.V1/Config/UiConfigResource.cs @@ -5,11 +5,11 @@ namespace Lidarr.Api.V1.Config { public class UiConfigResource : RestResource { - //Calendar + // Calendar public int FirstDayOfWeek { get; set; } public string CalendarWeekColumnHeader { get; set; } - //Dates + // Dates public string ShortDateFormat { get; set; } public string LongDateFormat { get; set; } public string TimeFormat { get; set; } diff --git a/src/Lidarr.Api.V1/FileSystem/FileSystemController.cs b/src/Lidarr.Api.V1/FileSystem/FileSystemController.cs index 948d3b76b..353f06ad5 100644 --- a/src/Lidarr.Api.V1/FileSystem/FileSystemController.cs +++ b/src/Lidarr.Api.V1/FileSystem/FileSystemController.cs @@ -36,7 +36,7 @@ namespace Lidarr.Api.V1.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/Lidarr.Api.V1/History/HistoryResource.cs b/src/Lidarr.Api.V1/History/HistoryResource.cs index eca074ae3..c34ad98e7 100644 --- a/src/Lidarr.Api.V1/History/HistoryResource.cs +++ b/src/Lidarr.Api.V1/History/HistoryResource.cs @@ -48,7 +48,7 @@ namespace Lidarr.Api.V1.History SourceTitle = model.SourceTitle, Quality = model.Quality, - //QualityCutoffNotMet + // QualityCutoffNotMet Date = model.Date, DownloadId = model.DownloadId, @@ -56,8 +56,8 @@ namespace Lidarr.Api.V1.History Data = model.Data - //Episode - //Series + // Episode + // Series }; } } diff --git a/src/Lidarr.Api.V1/Indexers/ReleaseResource.cs b/src/Lidarr.Api.V1/Indexers/ReleaseResource.cs index de363cec7..d9a17c4b1 100644 --- a/src/Lidarr.Api.V1/Indexers/ReleaseResource.cs +++ b/src/Lidarr.Api.V1/Indexers/ReleaseResource.cs @@ -51,12 +51,12 @@ namespace Lidarr.Api.V1.Indexers // Sent when queuing an unknown release [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] - // [JsonIgnore] + // [JsonIgnore] public int? ArtistId { get; set; } [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] - // [JsonIgnore] + // [JsonIgnore] public int? AlbumId { get; set; } } @@ -75,7 +75,7 @@ namespace Lidarr.Api.V1.Indexers Guid = releaseInfo.Guid, Quality = parsedAlbumInfo.Quality, - //QualityWeight + // QualityWeight Age = releaseInfo.Age, AgeHours = releaseInfo.AgeHours, AgeMinutes = releaseInfo.AgeMinutes, @@ -98,7 +98,7 @@ namespace Lidarr.Api.V1.Indexers InfoUrl = releaseInfo.InfoUrl, DownloadAllowed = remoteAlbum.DownloadAllowed, - //ReleaseWeight + // ReleaseWeight PreferredWordScore = remoteAlbum.PreferredWordScore, MagnetUrl = torrentInfo.MagnetUrl, diff --git a/src/Lidarr.Api.V1/ManualImport/ManualImportResource.cs b/src/Lidarr.Api.V1/ManualImport/ManualImportResource.cs index 8470ae13b..960e59262 100644 --- a/src/Lidarr.Api.V1/ManualImport/ManualImportResource.cs +++ b/src/Lidarr.Api.V1/ManualImport/ManualImportResource.cs @@ -51,7 +51,7 @@ namespace Lidarr.Api.V1.ManualImport Tracks = model.Tracks.ToResource(), Quality = model.Quality, - //QualityWeight + // QualityWeight DownloadId = model.DownloadId, Rejections = model.Rejections, AudioTags = model.Tags, diff --git a/src/Lidarr.Api.V1/ProviderResource.cs b/src/Lidarr.Api.V1/ProviderResource.cs index 444d64d53..b2d501a27 100644 --- a/src/Lidarr.Api.V1/ProviderResource.cs +++ b/src/Lidarr.Api.V1/ProviderResource.cs @@ -38,7 +38,7 @@ namespace Lidarr.Api.V1 Tags = definition.Tags, Fields = SchemaBuilder.ToSchema(definition.Settings), - //lidarr/supported is an disambagation page. the # should be a header on the page with appropriate details/link + // lidarr/supported is an disambagation page. the # should be a header on the page with appropriate details/link InfoLink = string.Format("https://wiki.servarr.com/lidarr/supported#{0}", definition.Implementation.ToLower()) }; diff --git a/src/Lidarr.Api.V1/Qualities/QualityDefinitionController.cs b/src/Lidarr.Api.V1/Qualities/QualityDefinitionController.cs index cf36f422e..9d7a261cf 100644 --- a/src/Lidarr.Api.V1/Qualities/QualityDefinitionController.cs +++ b/src/Lidarr.Api.V1/Qualities/QualityDefinitionController.cs @@ -40,7 +40,7 @@ namespace Lidarr.Api.V1.Qualities [HttpPut("update")] public object UpdateMany([FromBody] List resource) { - //Read from request + // Read from request var qualityDefinitions = resource .ToModel() .ToList(); diff --git a/src/Lidarr.Api.V1/Tracks/TrackResource.cs b/src/Lidarr.Api.V1/Tracks/TrackResource.cs index 4540b74ea..47f58811d 100644 --- a/src/Lidarr.Api.V1/Tracks/TrackResource.cs +++ b/src/Lidarr.Api.V1/Tracks/TrackResource.cs @@ -27,7 +27,7 @@ namespace Lidarr.Api.V1.Tracks public ArtistResource Artist { get; set; } public Ratings Ratings { get; set; } - //Hiding this so people don't think its usable (only used to set the initial state) + // Hiding this so people don't think its usable (only used to set the initial state) [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public bool Grabbed { get; set; } } diff --git a/src/Lidarr.Api.V1/Update/UpdateResource.cs b/src/Lidarr.Api.V1/Update/UpdateResource.cs index 18b07537a..ab62ff870 100644 --- a/src/Lidarr.Api.V1/Update/UpdateResource.cs +++ b/src/Lidarr.Api.V1/Update/UpdateResource.cs @@ -40,9 +40,9 @@ namespace Lidarr.Api.V1.Update FileName = model.FileName, Url = model.Url, - //Installed - //Installable - //Latest + // Installed + // Installable + // Latest Changes = model.Changes, Hash = model.Hash, }; diff --git a/src/Lidarr.Http/Extensions/RequestExtensions.cs b/src/Lidarr.Http/Extensions/RequestExtensions.cs index a614dd839..7fe891dec 100644 --- a/src/Lidarr.Http/Extensions/RequestExtensions.cs +++ b/src/Lidarr.Http/Extensions/RequestExtensions.cs @@ -15,7 +15,7 @@ namespace Lidarr.Http.Extensions // See src/Lidarr.Api.V1/Queue/QueueModule.cs private static readonly HashSet VALID_SORT_KEYS = new HashSet(StringComparer.OrdinalIgnoreCase) { - "artists.sortname", //Workaround authors table properties not being added on isValidSortKey call + "artists.sortname", // Workaround authors table properties not being added on isValidSortKey call "timeleft", "estimatedCompletionTime", "protocol", diff --git a/src/NzbDrone.Automation.Test/PageModel/PageBase.cs b/src/NzbDrone.Automation.Test/PageModel/PageBase.cs index fbb0bcf43..32bfe2477 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 d966e419c..542138ca1 100644 --- a/src/NzbDrone.Common.Test/DiskTests/DiskTransferServiceFixture.cs +++ b/src/NzbDrone.Common.Test/DiskTests/DiskTransferServiceFixture.cs @@ -395,7 +395,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/InstrumentationTests/CleanseLogMessageFixture.cs b/src/NzbDrone.Common.Test/InstrumentationTests/CleanseLogMessageFixture.cs index 0230c09eb..2f598b971 100644 --- a/src/NzbDrone.Common.Test/InstrumentationTests/CleanseLogMessageFixture.cs +++ b/src/NzbDrone.Common.Test/InstrumentationTests/CleanseLogMessageFixture.cs @@ -18,7 +18,7 @@ namespace NzbDrone.Common.Test.InstrumentationTests [TestCase(@"http://127.0.0.1:9117/dl/indexername?jackett_apikey=flwjiefewklfjacketmySecretsdfldskjfsdlk&path=we0re9f0sdfbase64sfdkfjsdlfjk&file=The+Torrent+File+Name.torrent")] [TestCase(@"http://nzb.su/getnzb/2b51db35e1912ffc138825a12b9933d2.nzb&i=37292&r=2b51db35e1910123321025a12b9933d2")] - //Indexer Responses + // Indexer Responses [TestCase(@"""download"":""https:\/\/avistaz.to\/rss\/download\/2b51db35e1910123321025a12b9933d2\/tb51db35e1910123321025a12b9933d2.torrent"",")] [TestCase(@",""info_hash"":""2b51db35e1910123321025a12b9933d2"",")] [TestCase(@",""rsskey"":""2b51db35e1910123321025a12b9933d2"",")] diff --git a/src/NzbDrone.Common.Test/ServiceProviderFixture.cs b/src/NzbDrone.Common.Test/ServiceProviderFixture.cs index fd48c49ce..0c9b0beb2 100644 --- a/src/NzbDrone.Common.Test/ServiceProviderFixture.cs +++ b/src/NzbDrone.Common.Test/ServiceProviderFixture.cs @@ -14,7 +14,7 @@ namespace NzbDrone.Common.Test [TestFixture] public class ServiceProviderFixture : 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 dd47136a0..6751df66a 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs @@ -205,7 +205,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 07e67f5f0..3911f6eb5 100644 --- a/src/NzbDrone.Common/Extensions/PathExtensions.cs +++ b/src/NzbDrone.Common/Extensions/PathExtensions.cs @@ -38,7 +38,7 @@ namespace NzbDrone.Common.Extensions public static string CleanFilePathBasic(this string path) { - //UNC + // UNC if (OsInfo.IsWindows && path.StartsWith(@"\\")) { return path.TrimEnd('/', '\\', ' '); @@ -167,7 +167,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 fb012bd1a..ef8a8a343 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/SortKeyValidationFixture.cs b/src/NzbDrone.Core.Test/Datastore/SortKeyValidationFixture.cs index 2fe925548..9b6af6687 100644 --- a/src/NzbDrone.Core.Test/Datastore/SortKeyValidationFixture.cs +++ b/src/NzbDrone.Core.Test/Datastore/SortKeyValidationFixture.cs @@ -17,7 +17,7 @@ namespace NzbDrone.Core.Test.Datastore TableMapping.Mapper.IsValidSortKey(sortKey).Should().BeFalse(); } - //[TestCase("artists.sortName")] TODO: Figure out why Artists table properties don't get mapped + // [TestCase("artists.sortName")] TODO: Figure out why Artists table properties don't get mapped [TestCase("Id")] [TestCase("id")] [TestCase("commands.id")] diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/HistorySpecificationFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/HistorySpecificationFixture.cs index 42c9dc1a5..514b0b178 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/HistorySpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/HistorySpecificationFixture.cs @@ -109,7 +109,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests _upgradeHistory.IsSatisfiedBy(_parseResultMulti, 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/Download/DownloadClientTests/DownloadClientFixtureBase.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs index 3915cddac..48464e8e9 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs @@ -72,8 +72,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); } @@ -83,8 +83,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); } @@ -94,8 +94,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); } @@ -103,8 +103,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); } @@ -116,7 +116,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/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/IndexerTests/NyaaTests/NyaaFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/NyaaTests/NyaaFixture.cs index 2d2d957d3..14e926ce2 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/NyaaTests/NyaaFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/NyaaTests/NyaaFixture.cs @@ -48,7 +48,7 @@ namespace NzbDrone.Core.Test.IndexerTests.NyaaTests torrentInfo.CommentUrl.Should().BeNullOrEmpty(); torrentInfo.Indexer.Should().Be(Subject.Definition.Name); torrentInfo.PublishDate.Should().Be(DateTime.Parse("2014/08/14 18:10:36")); - torrentInfo.Size.Should().Be(2523293286); //2.35 GiB + torrentInfo.Size.Should().Be(2523293286); // 2.35 GiB torrentInfo.InfoHash.Should().Be(null); torrentInfo.MagnetUrl.Should().Be(null); torrentInfo.Peers.Should().Be(2 + 1); diff --git a/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxyFixture.cs b/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxyFixture.cs index 5b818ff2e..933eb1009 100644 --- a/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxyFixture.cs +++ b/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxyFixture.cs @@ -224,7 +224,7 @@ namespace NzbDrone.Core.Test.MetadataSource.SkyHook } } - //if atleast one album has title it means parse it working. + // if atleast one album has title it means parse it working. if (!idOnly) { albums.Should().Contain(c => !string.IsNullOrWhiteSpace(c.Title)); diff --git a/src/NzbDrone.Core.Test/MusicTests/AlbumMonitoredServiceTests/AlbumMonitoredServiceFixture.cs b/src/NzbDrone.Core.Test/MusicTests/AlbumMonitoredServiceTests/AlbumMonitoredServiceFixture.cs index 2dc67fff2..ef5be9b57 100644 --- a/src/NzbDrone.Core.Test/MusicTests/AlbumMonitoredServiceTests/AlbumMonitoredServiceFixture.cs +++ b/src/NzbDrone.Core.Test/MusicTests/AlbumMonitoredServiceTests/AlbumMonitoredServiceFixture.cs @@ -29,11 +29,11 @@ namespace NzbDrone.Core.Test.MusicTests.AlbumMonitoredServiceTests .With(e => e.Monitored = true) .With(e => e.ReleaseDate = DateTime.UtcNow.AddDays(-7)) - //Future + // Future .TheFirst(1) .With(e => e.ReleaseDate = DateTime.UtcNow.AddDays(7)) - //Future/TBA + // Future/TBA .TheNext(1) .With(e => e.ReleaseDate = null) .Build() diff --git a/src/NzbDrone.Core.Test/MusicTests/MonitorNewAlbumServiceFixture.cs b/src/NzbDrone.Core.Test/MusicTests/MonitorNewAlbumServiceFixture.cs index 83e937e1e..e0cee525b 100644 --- a/src/NzbDrone.Core.Test/MusicTests/MonitorNewAlbumServiceFixture.cs +++ b/src/NzbDrone.Core.Test/MusicTests/MonitorNewAlbumServiceFixture.cs @@ -22,11 +22,11 @@ namespace NzbDrone.Core.Test.AlbumTests .With(e => e.Monitored = true) .With(e => e.ReleaseDate = DateTime.UtcNow.AddDays(-7)) - //Future + // Future .TheFirst(1) .With(e => e.ReleaseDate = DateTime.UtcNow.AddDays(7)) - //Future/TBA + // Future/TBA .TheNext(1) .With(e => e.ReleaseDate = null) .Build() diff --git a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/TitleTheFixture.cs b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/TitleTheFixture.cs index acc7440e6..1c47ef371 100644 --- a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/TitleTheFixture.cs +++ b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/TitleTheFixture.cs @@ -69,7 +69,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests [TestCase("The Rat Pack (A&E)", "Rat Pack, The (A&E)")] [TestCase("The Climax: I (Almost) Got Away With It (2016)", "Climax- I (Almost) Got Away With It, The (2016)")] - //[TestCase("", "")] + // [TestCase("", "")] public void should_get_expected_title_back(string name, string expected) { _artist.Name = name; diff --git a/src/NzbDrone.Core.Test/ParserTests/HashedReleaseFixture.cs b/src/NzbDrone.Core.Test/ParserTests/HashedReleaseFixture.cs index df542e252..f835a7305 100644 --- a/src/NzbDrone.Core.Test/ParserTests/HashedReleaseFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/HashedReleaseFixture.cs @@ -90,7 +90,7 @@ namespace NzbDrone.Core.Test.ParserTests { var result = Parser.Parser.ParseMusicPath(path); - //result.SeriesTitle.Should().Be(title); + // result.SeriesTitle.Should().Be(title); result.Quality.Quality.Should().Be(quality); } } diff --git a/src/NzbDrone.Core.Test/ParserTests/MusicParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/MusicParserFixture.cs index 82a9473db..87f992a5c 100644 --- a/src/NzbDrone.Core.Test/ParserTests/MusicParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/MusicParserFixture.cs @@ -8,24 +8,24 @@ namespace NzbDrone.Core.Test.ParserTests [TestFixture] public class MusicParserFixture : CoreTest { - //[TestCase("___▲▲▲___")] - //[TestCase("Add N to (X)")] - //[TestCase("Animal Collective")] - //[TestCase("D12")] - //[TestCase("David Sylvian[Discography]")] - //[TestCase("Eagle-Eye Cherry")] - //[TestCase("Erlend Øye")] - //[TestCase("Adult.")] // Not sure if valid, not openable in Windows OS - //[TestCase("Maroon 5")] - //[TestCase("Moimir Papalescu & The Nihilists")] - //[TestCase("N.W.A")] - //[TestCase("oOoOO")] - //[TestCase("Panic! at the Disco")] - //[TestCase("The 5 6 7 8's")] - //[TestCase("tUnE-yArDs")] - //[TestCase("U2")] - //[TestCase("Белые Братья")] - //[TestCase("Zog Bogbean - From The Marcy Playground")] + // [TestCase("___▲▲▲___")] + // [TestCase("Add N to (X)")] + // [TestCase("Animal Collective")] + // [TestCase("D12")] + // [TestCase("David Sylvian[Discography]")] + // [TestCase("Eagle-Eye Cherry")] + // [TestCase("Erlend Øye")] + // [TestCase("Adult.")] // Not sure if valid, not openable in Windows OS + // [TestCase("Maroon 5")] + // [TestCase("Moimir Papalescu & The Nihilists")] + // [TestCase("N.W.A")] + // [TestCase("oOoOO")] + // [TestCase("Panic! at the Disco")] + // [TestCase("The 5 6 7 8's")] + // [TestCase("tUnE-yArDs")] + // [TestCase("U2")] + // [TestCase("Белые Братья")] + // [TestCase("Zog Bogbean - From The Marcy Playground")] // TODO: Rewrite this test to something that makes sense. public void should_parse_artist_names(string title) diff --git a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs index 921d1246f..f4ab2f0ed 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs @@ -101,18 +101,18 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("VA - The Best 101 Love Ballads (2017) MP3 [192 kbps]", "VA", "The Best 101 Love Ballads")] [TestCase("ATCQ - The Love Movement 1998 2CD 192kbps RIP", "ATCQ", "The Love Movement")] - //[TestCase("A Tribe Called Quest - The Love Movement 1998 2CD [192kbps] RIP", "A Tribe Called Quest", "The Love Movement")] + // [TestCase("A Tribe Called Quest - The Love Movement 1998 2CD [192kbps] RIP", "A Tribe Called Quest", "The Love Movement")] [TestCase("Maula - Jism 2 [2012] Mp3 - 192Kbps [Extended]- TK", "Maula", "Jism 2")] [TestCase("VA - Complete Clubland - The Ultimate Ride Of Your Lfe [2014][MP3][192 kbps]", "VA", "Complete Clubland - The Ultimate Ride Of Your Lfe")] [TestCase("Complete Clubland - The Ultimate Ride Of Your Lfe [2014][MP3](192kbps)", "Complete Clubland", "The Ultimate Ride Of Your Lfe")] - //[TestCase("The Ultimate Ride Of Your Lfe [192 KBPS][2014][MP3]", "", "The Ultimate Ride Of Your Lfe")] + // [TestCase("The Ultimate Ride Of Your Lfe [192 KBPS][2014][MP3]", "", "The Ultimate Ride Of Your Lfe")] [TestCase("Gary Clark Jr - Live North America 2016 (2017) MP3 192kbps", "Gary Clark Jr", "Live North America 2016")] - //[TestCase("Beyoncé Lemonade [320] 2016 Beyonce Lemonade [320] 2016", "Beyoncé", "Lemonade")] + // [TestCase("Beyoncé Lemonade [320] 2016 Beyonce Lemonade [320] 2016", "Beyoncé", "Lemonade")] [TestCase("Childish Gambino - Awaken, My Love Album 2016 mp3 320 Kbps", "Childish Gambino", "Awaken, My Love Album")] - //[TestCase("Maluma – Felices Los 4 MP3 320 Kbps 2017 Download", "Maluma", "Felices Los 4")] + // [TestCase("Maluma – Felices Los 4 MP3 320 Kbps 2017 Download", "Maluma", "Felices Los 4")] [TestCase("Ricardo Arjona - APNEA (Single 2014) (320 kbps)", "Ricardo Arjona", "APNEA")] [TestCase("Kehlani - SweetSexySavage (Deluxe Edition) (2017) 320", "Kehlani", "SweetSexySavage")] [TestCase("Anderson Paak - Malibu (320)(2016)", "Anderson Paak", "Malibu")] @@ -125,9 +125,9 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Armin van Buuren - A State Of Trance 810 (20.04.2017) 256 kbps", "Armin van Buuren", "A State Of Trance 810")] [TestCase("PJ Harvey - Let England Shake [mp3-256-2011][trfkad]", "PJ Harvey", "Let England Shake")] - //[TestCase("X-Men Soundtracks (2006-2014) AAC, 256 kbps", "", "")] - //[TestCase("Walk the Line Soundtrack (2005) [AAC, 256 kbps]", "", "Walk the Line Soundtrack")] - //[TestCase("Emeli Sande Next To Me (512 Kbps)", "Emeli", "Next To Me")] + // [TestCase("X-Men Soundtracks (2006-2014) AAC, 256 kbps", "", "")] + // [TestCase("Walk the Line Soundtrack (2005) [AAC, 256 kbps]", "", "Walk the Line Soundtrack")] + // [TestCase("Emeli Sande Next To Me (512 Kbps)", "Emeli", "Next To Me")] [TestCase("Kendrick Lamar - DAMN (2017) FLAC", "Kendrick Lamar", "DAMN")] [TestCase("Alicia Keys - Vault Playlist Vol. 1 (2017) [FLAC CD]", "Alicia Keys", "Vault Playlist Vol 1")] [TestCase("Gorillaz - Humanz (Deluxe) - lossless FLAC Tracks - 2017 - CDrip", "Gorillaz", "Humanz")] @@ -138,11 +138,11 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("The Rolling Stones - The Very Best Of '75-'94 (1995) {FLAC}", "The Rolling Stones", "The Very Best Of '75-'94")] [TestCase("Migos-No_Label_II-CD-FLAC-2014-FORSAKEN", "Migos", "No Label II")] - //[TestCase("ADELE 25 CD FLAC 2015 PERFECT", "Adele", "25")] + // [TestCase("ADELE 25 CD FLAC 2015 PERFECT", "Adele", "25")] [TestCase("A.I. - Sex & Robots [2007/MP3/V0(VBR)]", "A I", "Sex & Robots")] [TestCase("Jay-Z - 4:44 (Deluxe Edition) (2017) 320", "Jay-Z", "444")] - //[TestCase("Roberta Flack 2006 - The Very Best of", "Roberta Flack", "The Very Best of")] + // [TestCase("Roberta Flack 2006 - The Very Best of", "Roberta Flack", "The Very Best of")] [TestCase("VA - NOW Thats What I Call Music 96 (2017) [Mp3~Kbps]", "VA", "NOW Thats What I Call Music 96")] [TestCase("Queen - The Ultimate Best Of Queen(2011)[mp3]", "Queen", "The Ultimate Best Of Queen")] [TestCase("Little Mix - Salute [Deluxe Edition] [2013] [M4A-256]-V3nom [GLT]", "Little Mix", "Salute")] @@ -164,16 +164,16 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("(Folk Rock / Pop) Aztec Two-Step - Naked - 2017, MP3, 320 kbps", "Aztec Two-Step", "Naked")] [TestCase("(Zeuhl / Progressive Rock) [WEB] Dai Kaht - Dai Kaht - 2017, FLAC (tracks), lossless", "Dai Kaht", "Dai Kaht")] - //[TestCase("(Industrial Folk) Bumblebee(Shmely, AntiVirus) - Discography, 23 albums - 1998-2011, FLAC(image + .cue), lossless")] - //[TestCase("(Heavy Metal) Sergey Mavrin(Mavrik) - Discography(14 CD) [1998-2010], FLAC(image + .cue), lossless")] + // [TestCase("(Industrial Folk) Bumblebee(Shmely, AntiVirus) - Discography, 23 albums - 1998-2011, FLAC(image + .cue), lossless")] + // [TestCase("(Heavy Metal) Sergey Mavrin(Mavrik) - Discography(14 CD) [1998-2010], FLAC(image + .cue), lossless")] [TestCase("(Heavy Metal) [CD] Black Obelisk - Discography - 1991-2015 (36 releases, 32 CDs), FLAC(image + .cue), lossless", "Black Obelisk", "Discography", true)] - //[TestCase("(R'n'B / Soul) Moyton - One of the Sta(2014) + Ocean(2014), MP3, 320 kbps", "Moyton", "")] + // [TestCase("(R'n'B / Soul) Moyton - One of the Sta(2014) + Ocean(2014), MP3, 320 kbps", "Moyton", "")] [TestCase("(Heavy Metal) Aria - Discography(46 CD) [1985 - 2015], FLAC(image + .cue), lossless", "Aria", "Discography", true)] [TestCase("(Heavy Metal) [CD] Forces United - Discography(6 CDs), 2014-2016, FLAC(image + .cue), lossless", "Forces United", "Discography", true)] [TestCase("Gorillaz - The now now - 2018 [FLAC]", "Gorillaz", "The now now")] - //Regex Works on below, but ParseAlbumMatchCollection cleans the "..." and converts it to spaces + // Regex Works on below, but ParseAlbumMatchCollection cleans the "..." and converts it to spaces // [TestCase("Metallica - ...And Justice for All (1988) [FLAC Lossless]", "Metallica", "...And Justice for All")] public void should_parse_artist_name_and_album_title(string postTitle, string name, string title, bool discography = false) { @@ -222,7 +222,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Ed Sheeran", "Divide", "Ed Sheeran ? Divide FLAC")] [TestCase("Ed Sheeran", "+", "Ed Sheeran + FLAC")] - //[TestCase("Glasvegas", @"EUPHORIC /// HEARTBREAK \\\", @"EUPHORIC /// HEARTBREAK \\\ FLAC")] // slashes not being escaped properly + // [TestCase("Glasvegas", @"EUPHORIC /// HEARTBREAK \\\", @"EUPHORIC /// HEARTBREAK \\\ FLAC")] // slashes not being escaped properly [TestCase("XXXTENTACION", "?", "XXXTENTACION ? FLAC")] [TestCase("Hey", "BŁYSK", "Hey - BŁYSK FLAC")] public void should_escape_albums(string artist, string album, string releaseTitle) diff --git a/src/NzbDrone.Core.Test/ParserTests/PathParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/PathParserFixture.cs index d8b00613e..e09486cc0 100644 --- a/src/NzbDrone.Core.Test/ParserTests/PathParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/PathParserFixture.cs @@ -29,16 +29,16 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase(@"C:\Test\Series\Season 1\02 Honor Thy Father (1080p HD).m4v", 1, 2)] [TestCase(@"C:\Test\Series\Season 1\2 Honor Thy Father (1080p HD).m4v", 1, 2)] - // [TestCase(@"C:\CSI.NY.S02E04.720p.WEB-DL.DD5.1.H.264\73696S02-04.mkv", 2, 4)] //Gets treated as S01E04 (because it gets parsed as anime) + // [TestCase(@"C:\CSI.NY.S02E04.720p.WEB-DL.DD5.1.H.264\73696S02-04.mkv", 2, 4)] //Gets treated as S01E04 (because it gets parsed as anime) public void should_parse_from_path(string path, int season, int episode) { var result = Parser.Parser.ParseMusicPath(path.AsOsAgnostic()); - //result.EpisodeNumbers.Should().HaveCount(1); - //result.SeasonNumber.Should().Be(season); - //result.EpisodeNumbers[0].Should().Be(episode); - //result.AbsoluteEpisodeNumbers.Should().BeEmpty(); - //result.FullSeason.Should().BeFalse(); + // result.EpisodeNumbers.Should().HaveCount(1); + // result.SeasonNumber.Should().Be(season); + // result.EpisodeNumbers[0].Should().Be(episode); + // result.AbsoluteEpisodeNumbers.Should().BeEmpty(); + // result.FullSeason.Should().BeFalse(); ExceptionVerification.IgnoreWarns(); } } diff --git a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs index 0dafda8d0..ee556b69d 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -92,7 +92,7 @@ namespace NzbDrone.Core.Test.ParserTests ParseAndVerifyQuality(title, desc, bitrate, Quality.MP3_VBR); } - //TODO Parser should look at bitrate range for quality to determine level of VBR + // TODO Parser should look at bitrate range for quality to determine level of VBR [TestCase("", "MPEG Version 1 Audio, Layer 3 VBR", 298)] [Ignore("Parser should look at bitrate range for quality to determine level of VBR")] public void should_parse_mp3_vbr_v2_quality(string title, string desc, int bitrate) @@ -260,8 +260,8 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("The Chainsmokers & Coldplay - Something Just Like This")] [TestCase("Frank Ocean Blonde 2016")] - //TODO: This should be parsed as Unknown and not MP3-96 - //[TestCase("A - NOW Thats What I Call Music 96 (2017) [Mp3~Kbps]")] + // TODO: This should be parsed as Unknown and not MP3-96 + // [TestCase("A - NOW Thats What I Call Music 96 (2017) [Mp3~Kbps]")] [TestCase("Queen - The Ultimate Best Of Queen(2011)[mp3]")] [TestCase("Maroon 5 Ft Kendrick Lamar -Dont Wanna Know MP3 2016")] public void quality_parse(string title) @@ -287,10 +287,10 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("01. Kanye West - Ultralight Beam.mp3")] [TestCase("01. Kanye West - Ultralight Beam.ogg")] - //These get detected by name as we are looking for the extensions as identifiers for release names - //[TestCase("01. Kanye West - Ultralight Beam.m4a")] - //[TestCase("01. Kanye West - Ultralight Beam.wma")] - //[TestCase("01. Kanye West - Ultralight Beam.wav")] + // These get detected by name as we are looking for the extensions as identifiers for release names + // [TestCase("01. Kanye West - Ultralight Beam.m4a")] + // [TestCase("01. Kanye West - Ultralight Beam.wma")] + // [TestCase("01. Kanye West - Ultralight Beam.wav")] public void should_parse_quality_from_extension(string title) { QualityParser.ParseQuality(title, null, 0).QualityDetectionSource.Should().Be(QualityDetectionSource.Extension); diff --git a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs index 24bdc6ad3..d498de1bb 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ReleaseGroupParserFixture.cs @@ -15,7 +15,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Olafur.Arnalds-Remember-WEB-2018-ENTiTLED-postbot", "ENTiTLED")] [TestCase("Olafur.Arnalds-Remember-WEB-2018-ENTiTLED-xpost", "ENTiTLED")] - //[TestCase("", "")] + // [TestCase("", "")] public void should_parse_release_group(string title, string expected) { Parser.Parser.ParseReleaseGroup(title).Should().Be(expected); @@ -34,7 +34,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Olafur.Arnalds-Remember-WEB-2018-SKGTV_English", "SKGTV")] [TestCase("Olafur.Arnalds-Remember-WEB-2018-SKGTV.English", "SKGTV")] - //[TestCase("", "")] + // [TestCase("", "")] public void should_not_include_language_in_release_group(string title, string expected) { Parser.Parser.ParseReleaseGroup(title).Should().Be(expected); @@ -60,8 +60,8 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("[Anime-Koi] Barakamon - S01E07 - A High-Grade Fish", "Anime-Koi")] [TestCase("[Anime-Koi] Kami-sama Hajimemashita 2 - 01 [h264-720p][28D54E2C]", "Anime-Koi")] - //[TestCase("Tokyo.Ghoul.02x01.013.HDTV-720p-Anime-Koi", "Anime-Koi")] - //[TestCase("", "")] + // [TestCase("Tokyo.Ghoul.02x01.013.HDTV-720p-Anime-Koi", "Anime-Koi")] + // [TestCase("", "")] public void should_parse_anime_release_groups(string title, string expected) { Parser.Parser.ParseReleaseGroup(title).Should().Be(expected); diff --git a/src/NzbDrone.Core.Test/Profiles/Metadata/MetadataProfileServiceFixture.cs b/src/NzbDrone.Core.Test/Profiles/Metadata/MetadataProfileServiceFixture.cs index 00c40579f..c680ddcec 100644 --- a/src/NzbDrone.Core.Test/Profiles/Metadata/MetadataProfileServiceFixture.cs +++ b/src/NzbDrone.Core.Test/Profiles/Metadata/MetadataProfileServiceFixture.cs @@ -28,8 +28,8 @@ namespace NzbDrone.Core.Test.Profiles.Metadata [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/Profiles/ProfileServiceFixture.cs b/src/NzbDrone.Core.Test/Profiles/ProfileServiceFixture.cs index 4044f658f..6ee2c0938 100644 --- a/src/NzbDrone.Core.Test/Profiles/ProfileServiceFixture.cs +++ b/src/NzbDrone.Core.Test/Profiles/ProfileServiceFixture.cs @@ -26,8 +26,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/Configuration/ConfigFileProvider.cs b/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs index a69101a9d..2156381a6 100644 --- a/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs +++ b/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs @@ -270,13 +270,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 3d1be0eb1..6cef2ad88 100644 --- a/src/NzbDrone.Core/Configuration/IConfigService.cs +++ b/src/NzbDrone.Core/Configuration/IConfigService.cs @@ -12,16 +12,16 @@ namespace NzbDrone.Core.Configuration bool IsDefined(string key); - //Download Client + // Download Client string DownloadClientWorkingFolders { get; set; } int DownloadClientHistoryLimit { 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 AutoUnmonitorPreviouslyDownloadedTracks { get; set; } string RecycleBin { get; set; } int RecycleBinCleanupDays { get; set; } @@ -38,18 +38,18 @@ namespace NzbDrone.Core.Configuration RescanAfterRefreshType RescanAfterRefresh { get; set; } AllowFingerprinting AllowFingerprinting { 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; } int MinimumAge { get; set; } - //UI + // UI int FirstDayOfWeek { get; set; } string CalendarWeekColumnHeader { get; set; } @@ -66,23 +66,23 @@ namespace NzbDrone.Core.Configuration bool ExpandBroadcastByDefault { get; set; } bool ExpandOtherByDefault { get; set; } - //Internal + // Internal bool CleanupMetadataImages { get; set; } string PlexClientIdentifier { get; } - //Metadata + // Metadata string MetadataSource { get; set; } WriteAudioTagsType WriteAudioTags { get; set; } bool ScrubAudioTags { get; set; } - //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/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 28dea9b07..1bcdcfcbf 100644 --- a/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs +++ b/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs @@ -80,19 +80,19 @@ namespace NzbDrone.Core.DecisionEngine if (parsedAlbumInfo != null) { // TODO: Artist Data Augment without calling to parse title again - //if (!report.Artist.IsNullOrWhiteSpace()) - //{ + // if (!report.Artist.IsNullOrWhiteSpace()) + // { // if (parsedAlbumInfo.ArtistName.IsNullOrWhiteSpace() || _parsingService.GetArtist(parsedAlbumInfo.ArtistName) == null) // { // parsedAlbumInfo.ArtistName = report.Artist; // } - //} + // } // TODO: Replace Parsed AlbumTitle with metadata Title if Parsed AlbumTitle not a valid match - //if (!report.Album.IsNullOrWhiteSpace()) - //{ + // if (!report.Album.IsNullOrWhiteSpace()) + // { // parsedAlbumInfo.AlbumTitle = report.Album; - //} + // } if (!parsedAlbumInfo.ArtistName.IsNullOrWhiteSpace()) { var remoteAlbum = _parsingService.Map(parsedAlbumInfo, searchCriteria); diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs index d19323c91..1cfc12c6d 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs @@ -48,10 +48,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications var minSize = qualityDefinition.MinSize.Value.Kilobits(); - //Multiply minSize by smallest release duration + // Multiply minSize by smallest release duration minSize = minSize * minReleaseDuration; - //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 = $"{minReleaseDuration}sec"; @@ -74,10 +74,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications { var maxSize = qualityDefinition.MaxSize.Value.Kilobits(); - //Multiply maxSize by Album.Duration + // Multiply maxSize by Album.Duration maxSize = maxSize * maxReleaseDuration; - //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) { var runtimeMessage = $"{maxReleaseDuration}sec"; diff --git a/src/NzbDrone.Core/Download/Clients/Aria2/Aria2.cs b/src/NzbDrone.Core/Download/Clients/Aria2/Aria2.cs index 0af3f4a95..5a33b736b 100644 --- a/src/NzbDrone.Core/Download/Clients/Aria2/Aria2.cs +++ b/src/NzbDrone.Core/Download/Clients/Aria2/Aria2.cs @@ -77,7 +77,7 @@ namespace NzbDrone.Core.Download.Clients.Aria2 { var firstFile = torrent.Files?.FirstOrDefault(); - //skip metadata download + // skip metadata download if (firstFile?.Path?.Contains("[METADATA]") == true) { continue; diff --git a/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackholeSettings.cs b/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackholeSettings.cs index e08d89e39..4d6135a70 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 370cdffb2..9dbdccb24 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 02ea2968f..09e890146 100644 --- a/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs +++ b/src/NzbDrone.Core/Download/Clients/Pneumatic/Pneumatic.cs @@ -44,7 +44,7 @@ namespace NzbDrone.Core.Download.Clients.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 3bb48d785..8ff7bd344 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/CompletedDownloadService.cs b/src/NzbDrone.Core/Download/CompletedDownloadService.cs index 9e0518cb1..0f27bda99 100644 --- a/src/NzbDrone.Core/Download/CompletedDownloadService.cs +++ b/src/NzbDrone.Core/Download/CompletedDownloadService.cs @@ -142,7 +142,7 @@ namespace NzbDrone.Core.Download if (importResults.Any(c => c.Result != ImportResultType.Imported)) { - //Mark as failed to prevent further attempts at processing + // Mark as failed to prevent further attempts at processing trackedDownload.State = TrackedDownloadState.ImportFailed; statusMessages.AddRange( @@ -158,7 +158,7 @@ namespace NzbDrone.Core.Download trackedDownload.Warn(statusMessages.ToArray()); } - //Publish event to notify Album was imported incompelte + // Publish event to notify Album was imported incompelte _eventAggregator.PublishEvent(new AlbumImportIncompleteEvent(trackedDownload)); return; } diff --git a/src/NzbDrone.Core/Download/Pending/PendingRelease.cs b/src/NzbDrone.Core/Download/Pending/PendingRelease.cs index a9273ec2e..15a7cfefc 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 RemoteAlbum RemoteAlbum { get; set; } } } diff --git a/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs b/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs index c521870cb..e66a09d43 100644 --- a/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs +++ b/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs @@ -210,7 +210,7 @@ namespace NzbDrone.Core.Download.Pending } } - //Return best quality release for each album + // Return best quality release for each album var deduped = queued.GroupBy(q => q.Album.Id).Select(g => { var artist = g.First().Artist; @@ -376,8 +376,8 @@ namespace NzbDrone.Core.Download.Pending var compare = new QualityModelComparer(profile).Compare(remoteAlbum.ParsedAlbumInfo.Quality, existingReport.RemoteAlbum.ParsedAlbumInfo.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 c47cc44f2..ab7c67f3d 100644 --- a/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs +++ b/src/NzbDrone.Core/Download/ProcessDownloadDecisions.cs @@ -40,7 +40,7 @@ namespace NzbDrone.Core.Download var grabbed = new List(); var pending = new List(); - //var failed = new List(); + // var failed = new List(); var rejected = decisions.Where(d => d.Rejected).ToList(); var pendingAddQueue = new List>(); @@ -53,7 +53,7 @@ namespace NzbDrone.Core.Download var remoteAlbum = report.RemoteAlbum; var downloadProtocol = report.RemoteAlbum.Release.DownloadProtocol; - //Skip if already grabbed + // Skip if already grabbed if (IsAlbumProcessed(grabbed, report)) { continue; @@ -116,7 +116,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.RemoteAlbum.Albums.Any()).ToList(); } diff --git a/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadService.cs b/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadService.cs index 3e20d2287..e207a1598 100644 --- a/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadService.cs +++ b/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadService.cs @@ -124,7 +124,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads .OrderByDescending(h => h.Date) .ToList(); - //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 parsedAlbumInfo = Parser.Parser.ParseAlbumTitle(trackedDownload.DownloadItem.Title); if (parsedAlbumInfo != null) diff --git a/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadStatusMessage.cs b/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownloadStatusMessage.cs index 5ce6532d4..a8a0e661c 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 public TrackedDownloadStatusMessage() { } diff --git a/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs b/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs index fb64e6d6b..0ef36d545 100644 --- a/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs +++ b/src/NzbDrone.Core/Extras/Metadata/Consumers/Roksbox/RoksboxMetadata.cs @@ -66,7 +66,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Roksbox RelativePath = artist.Path.GetRelativePath(path) }; - //Series and season images are both named folder.jpg, only season ones sit in season folders + // Series and season images are both named folder.jpg, only season ones sit in season folders if (Path.GetFileNameWithoutExtension(filename).Equals(parentdir.Name, StringComparison.InvariantCultureIgnoreCase)) { var seasonMatch = SeasonImagesRegex.Match(parentdir.Name); @@ -109,7 +109,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Roksbox public override MetadataFileResult ArtistMetadata(Artist artist) { - //Artist metadata is not supported + // Artist metadata is not supported return null; } diff --git a/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadata.cs b/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadata.cs index 609f8b6dd..1b3b34e12 100644 --- a/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadata.cs +++ b/src/NzbDrone.Core/Extras/Metadata/Consumers/Wdtv/WdtvMetadata.cs @@ -77,7 +77,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Wdtv public override MetadataFileResult ArtistMetadata(Artist artist) { - //Artist metadata is not supported + // Artist metadata is not supported return null; } diff --git a/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs b/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs index a9912ee16..87a70dc8f 100644 --- a/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs +++ b/src/NzbDrone.Core/Extras/Metadata/MetadataService.cs @@ -509,7 +509,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(artist.Path, file.RelativePath); diff --git a/src/NzbDrone.Core/History/EntityHistoryService.cs b/src/NzbDrone.Core/History/EntityHistoryService.cs index a50e296fb..4d2e8a4d0 100644 --- a/src/NzbDrone.Core/History/EntityHistoryService.cs +++ b/src/NzbDrone.Core/History/EntityHistoryService.cs @@ -100,7 +100,7 @@ namespace NzbDrone.Core.History var allHistory = _historyRepository.FindDownloadHistory(trackedDownload.TrackInfo.Artist.Id, trackedDownload.ImportedTrack.Quality); - //Find download related items for these episodes + // Find download related items for these episodes var albumsHistory = allHistory.Where(h => albumIds.Contains(h.AlbumId)).ToList(); var processedDownloadId = albumsHistory @@ -230,8 +230,8 @@ namespace NzbDrone.Core.History DownloadId = downloadId }; - //Won't have a value since we publish this event before saving to DB. - //history.Data.Add("FileId", message.ImportedEpisode.Id.ToString()); + // Won't have a value since we publish this event before saving to DB. + // history.Data.Add("FileId", message.ImportedEpisode.Id.ToString()); history.Data.Add("DroppedPath", message.TrackInfo.Path); history.Data.Add("ImportedPath", message.ImportedTrack.Path); history.Data.Add("DownloadClient", message.DownloadClientInfo.Name); 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/IndexerSearch/Definitions/SearchCriteriaBase.cs b/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs index 087087658..d69da507b 100644 --- a/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs +++ b/src/NzbDrone.Core/IndexerSearch/Definitions/SearchCriteriaBase.cs @@ -39,7 +39,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(); cleanTitle = cleanTitle.Trim('+', ' '); diff --git a/src/NzbDrone.Core/Indexers/FileList/FileListParser.cs b/src/NzbDrone.Core/Indexers/FileList/FileListParser.cs index 5b3425480..1770d40d3 100644 --- a/src/NzbDrone.Core/Indexers/FileList/FileListParser.cs +++ b/src/NzbDrone.Core/Indexers/FileList/FileListParser.cs @@ -34,7 +34,7 @@ namespace NzbDrone.Core.Indexers.FileList { var id = result.Id; - //if (result.FreeLeech) + // if (result.FreeLeech) torrentInfos.Add(new TorrentInfo() { Guid = $"FileList-{id}", diff --git a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs index 0e0eee611..212f41b58 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/MediaFiles/DownloadedAlbumsCommandService.cs b/src/NzbDrone.Core/MediaFiles/DownloadedAlbumsCommandService.cs index 470061340..1a0a3e853 100644 --- a/src/NzbDrone.Core/MediaFiles/DownloadedAlbumsCommandService.cs +++ b/src/NzbDrone.Core/MediaFiles/DownloadedAlbumsCommandService.cs @@ -79,7 +79,7 @@ namespace NzbDrone.Core.MediaFiles { // Atm we don't report it as a command failure, coz that would cause the download to be failed. // Changing the message won't do a thing either, coz it will get set to 'Completed' a msec later. - //message.SetMessage("Failed to import"); + // message.SetMessage("Failed to import"); } } } diff --git a/src/NzbDrone.Core/MediaFiles/MediaFileAttributeService.cs b/src/NzbDrone.Core/MediaFiles/MediaFileAttributeService.cs index d3f3961c5..67b49e435 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/MediaFileRepository.cs b/src/NzbDrone.Core/MediaFiles/MediaFileRepository.cs index cac31f4cc..7eaaf1f5d 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaFileRepository.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaFileRepository.cs @@ -88,7 +88,7 @@ namespace NzbDrone.Core.MediaFiles public List GetUnmappedFiles() { - //x.Id == null is converted to SQL, so warning incorrect + // x.Id == null is converted to SQL, so warning incorrect #pragma warning disable CS0472 return _database.Query(new SqlBuilder(_database.DatabaseType).Select(typeof(TrackFile)) .LeftJoin((f, t) => f.Id == t.TrackFileId) diff --git a/src/NzbDrone.Core/MediaFiles/TrackImport/Identification/Munkres.cs b/src/NzbDrone.Core/MediaFiles/TrackImport/Identification/Munkres.cs index 02348ee10..52590f260 100644 --- a/src/NzbDrone.Core/MediaFiles/TrackImport/Identification/Munkres.cs +++ b/src/NzbDrone.Core/MediaFiles/TrackImport/Identification/Munkres.cs @@ -118,8 +118,8 @@ namespace NzbDrone.Core.MediaFiles.TrackImport.Identification return outp; } - //For each row of the cost matrix, find the smallest element and subtract - //it from every element in its row. When finished, Go to Step 2. + // For each row of the cost matrix, find the smallest element and subtract + // it from every element in its row. When finished, Go to Step 2. private void step_one(ref int step) { double min_in_row; @@ -144,9 +144,9 @@ namespace NzbDrone.Core.MediaFiles.TrackImport.Identification step = 2; } - //Find a zero (Z) in the resulting matrix. If there is no starred - //zero in its row or column, star Z. Repeat for each element in the - //matrix. Go to Step 3. + // Find a zero (Z) in the resulting matrix. If there is no starred + // zero in its row or column, star Z. Repeat for each element in the + // matrix. Go to Step 3. private void step_two(ref int step) { for (int r = 0; r < n; r++) @@ -175,9 +175,9 @@ namespace NzbDrone.Core.MediaFiles.TrackImport.Identification step = 3; } - //Cover each column containing a starred zero. If K columns are covered, - //the starred zeros describe a complete set of unique assignments. In this - //case, Go to DONE, otherwise, Go to Step 4. + // Cover each column containing a starred zero. If K columns are covered, + // the starred zeros describe a complete set of unique assignments. In this + // case, Go to DONE, otherwise, Go to Step 4. private void step_three(ref int step) { int colcount; @@ -211,7 +211,7 @@ namespace NzbDrone.Core.MediaFiles.TrackImport.Identification } } - //methods to support step 4 + // methods to support step 4 private void find_a_zero(ref int row, ref int col) { int r = 0; @@ -273,11 +273,11 @@ namespace NzbDrone.Core.MediaFiles.TrackImport.Identification } } - //Find a noncovered zero and prime it. If there is no starred zero - //in the row containing this primed zero, Go to Step 5. Otherwise, - //cover this row and uncover the column containing the starred zero. - //Continue in this manner until there are no uncovered zeros left. - //Save the smallest uncovered value and Go to Step 6. + // Find a noncovered zero and prime it. If there is no starred zero + // in the row containing this primed zero, Go to Step 5. Otherwise, + // cover this row and uncover the column containing the starred zero. + // Continue in this manner until there are no uncovered zeros left. + // Save the smallest uncovered value and Go to Step 6. private void step_four(ref int step) { int row = -1; @@ -379,13 +379,13 @@ namespace NzbDrone.Core.MediaFiles.TrackImport.Identification } } - //Construct a series of alternating primed and starred zeros as follows. - //Let Z0 represent the uncovered primed zero found in Step 4. Let Z1 denote - //the starred zero in the column of Z0 (if any). Let Z2 denote the primed zero - //in the row of Z1 (there will always be one). Continue until the series - //terminates at a primed zero that has no starred zero in its column. - //Unstar each starred zero of the series, star each primed zero of the series, - //erase all primes and uncover every line in the matrix. Return to Step 3. + // Construct a series of alternating primed and starred zeros as follows. + // Let Z0 represent the uncovered primed zero found in Step 4. Let Z1 denote + // the starred zero in the column of Z0 (if any). Let Z2 denote the primed zero + // in the row of Z1 (there will always be one). Continue until the series + // terminates at a primed zero that has no starred zero in its column. + // Unstar each starred zero of the series, star each primed zero of the series, + // erase all primes and uncover every line in the matrix. Return to Step 3. private void step_five(ref int step) { bool done; @@ -425,7 +425,7 @@ namespace NzbDrone.Core.MediaFiles.TrackImport.Identification step = 3; } - //methods to support step 6 + // methods to support step 6 private void find_smallest(ref double minval) { for (int r = 0; r < n; r++) @@ -443,9 +443,9 @@ namespace NzbDrone.Core.MediaFiles.TrackImport.Identification } } - //Add the value found in Step 4 to every element of each covered row, and subtract - //it from every element of each uncovered column. Return to Step 4 without - //altering any stars, primes, or covered lines. + // Add the value found in Step 4 to every element of each covered row, and subtract + // it from every element of each uncovered column. Return to Step 4 without + // altering any stars, primes, or covered lines. private void step_six(ref int step) { double minval = double.MaxValue; diff --git a/src/NzbDrone.Core/MediaFiles/TrackImport/ImportApprovedTracks.cs b/src/NzbDrone.Core/MediaFiles/TrackImport/ImportApprovedTracks.cs index 9b769b66a..26e717acd 100644 --- a/src/NzbDrone.Core/MediaFiles/TrackImport/ImportApprovedTracks.cs +++ b/src/NzbDrone.Core/MediaFiles/TrackImport/ImportApprovedTracks.cs @@ -149,7 +149,7 @@ namespace NzbDrone.Core.MediaFiles.TrackImport try { - //check if already imported + // check if already imported if (importResults.SelectMany(r => r.ImportDecision.Item.Tracks) .Select(e => e.Id) .Intersect(localTrack.Tracks.Select(e => e.Id)) @@ -307,7 +307,7 @@ namespace NzbDrone.Core.MediaFiles.TrackImport } } - //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/Messaging/Events/EventAggregator.cs b/src/NzbDrone.Core/Messaging/Events/EventAggregator.cs index e492381de..275cf8f7e 100644 --- a/src/NzbDrone.Core/Messaging/Events/EventAggregator.cs +++ b/src/NzbDrone.Core/Messaging/Events/EventAggregator.cs @@ -85,7 +85,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/SkyHookProxy.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs index 3701c0509..bd4694156 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs @@ -207,7 +207,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook return new List { existingArtist }; } - var metadataProfile = _metadataProfileService.All().First().Id; //Change this to Use last Used profile? + var metadataProfile = _metadataProfileService.All().First().Id; // Change this to Use last Used profile? return new List { GetArtistInfo(searchGuid.ToString(), metadataProfile) }; } diff --git a/src/NzbDrone.Core/Music/Model/Album.cs b/src/NzbDrone.Core/Music/Model/Album.cs index 43b50aea7..582ffe241 100644 --- a/src/NzbDrone.Core/Music/Model/Album.cs +++ b/src/NzbDrone.Core/Music/Model/Album.cs @@ -57,7 +57,7 @@ namespace NzbDrone.Core.Music [MemberwiseEqualityIgnore] public LazyLoaded Artist { get; set; } - //compatibility properties with old version of Album + // compatibility properties with old version of Album [MemberwiseEqualityIgnore] [JsonIgnore] public int ArtistId diff --git a/src/NzbDrone.Core/Music/Model/Artist.cs b/src/NzbDrone.Core/Music/Model/Artist.cs index a1f840e46..eb60e2140 100644 --- a/src/NzbDrone.Core/Music/Model/Artist.cs +++ b/src/NzbDrone.Core/Music/Model/Artist.cs @@ -42,7 +42,7 @@ namespace NzbDrone.Core.Music [MemberwiseEqualityIgnore] public LazyLoaded> Albums { get; set; } - //compatibility properties + // compatibility properties [MemberwiseEqualityIgnore] public string Name { diff --git a/src/NzbDrone.Core/Music/Repositories/AlbumRepository.cs b/src/NzbDrone.Core/Music/Repositories/AlbumRepository.cs index 4dbb18f22..1678ea083 100644 --- a/src/NzbDrone.Core/Music/Repositories/AlbumRepository.cs +++ b/src/NzbDrone.Core/Music/Repositories/AlbumRepository.cs @@ -90,7 +90,7 @@ namespace NzbDrone.Core.Music return Query(s => s.ForeignAlbumId == foreignAlbumId).SingleOrDefault(); } - //x.Id == null is converted to SQL, so warning incorrect + // x.Id == null is converted to SQL, so warning incorrect #pragma warning disable CS0472 private SqlBuilder AlbumsWithoutFilesBuilder(DateTime currentTime) { diff --git a/src/NzbDrone.Core/Music/Repositories/TrackRepository.cs b/src/NzbDrone.Core/Music/Repositories/TrackRepository.cs index 75c8b7a1b..83e24a8bf 100644 --- a/src/NzbDrone.Core/Music/Repositories/TrackRepository.cs +++ b/src/NzbDrone.Core/Music/Repositories/TrackRepository.cs @@ -92,7 +92,7 @@ namespace NzbDrone.Core.Music public List TracksWithoutFiles(int albumId) { - //x.Id == null is converted to SQL, so warning incorrect + // x.Id == null is converted to SQL, so warning incorrect #pragma warning disable CS0472 return Query(Builder() .Join((t, r) => t.AlbumReleaseId == r.Id) diff --git a/src/NzbDrone.Core/Music/Services/AlbumCutoffService.cs b/src/NzbDrone.Core/Music/Services/AlbumCutoffService.cs index fc6b325bd..187be1f0c 100644 --- a/src/NzbDrone.Core/Music/Services/AlbumCutoffService.cs +++ b/src/NzbDrone.Core/Music/Services/AlbumCutoffService.cs @@ -27,7 +27,7 @@ namespace NzbDrone.Core.Music 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 cutoffIndex = profile.GetIndex(profile.Cutoff); diff --git a/src/NzbDrone.Core/Music/Services/AlbumService.cs b/src/NzbDrone.Core/Music/Services/AlbumService.cs index abce226ce..fed437aef 100644 --- a/src/NzbDrone.Core/Music/Services/AlbumService.cs +++ b/src/NzbDrone.Core/Music/Services/AlbumService.cs @@ -291,7 +291,7 @@ namespace NzbDrone.Core.Music public void Handle(ArtistsDeletedEvent message) { - //TODO Do this in one call instead of one for each artist? + // TODO Do this in one call instead of one for each artist? var albums = message.Artists.SelectMany(x => GetAlbumsByArtistMetadataId(x.ArtistMetadataId)).ToList(); DeleteMany(albums); } diff --git a/src/NzbDrone.Core/Notifications/Discord/Discord.cs b/src/NzbDrone.Core/Notifications/Discord/Discord.cs index dafaa288f..a0ccbeb12 100644 --- a/src/NzbDrone.Core/Notifications/Discord/Discord.cs +++ b/src/NzbDrone.Core/Notifications/Discord/Discord.cs @@ -396,7 +396,7 @@ namespace NzbDrone.Core.Notifications.Discord private 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 a79b8d073..8bc7878d4 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 int[] { 0, 1, 2, 3, 5, 6, 7, 8, 9 }; ImportFields = new int[] { 0, 1, 2, 3, 5, 6, 7, 8, 9 }; } diff --git a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs index f774140f9..549ac63a9 100644 --- a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs +++ b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs @@ -99,7 +99,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 } public List GetArtist(MediaBrowserSettings settings) diff --git a/src/NzbDrone.Core/Notifications/NotificationService.cs b/src/NzbDrone.Core/Notifications/NotificationService.cs index 0a13400be..37f5afeeb 100644 --- a/src/NzbDrone.Core/Notifications/NotificationService.cs +++ b/src/NzbDrone.Core/Notifications/NotificationService.cs @@ -94,7 +94,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, artist.Name); return false; } diff --git a/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs b/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs index 53fa09a67..02ba85c28 100644 --- a/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs +++ b/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs @@ -26,7 +26,7 @@ namespace NzbDrone.Core.Notifications.Pushover Devices = new string[] { }; } - //TODO: Get Pushover to change our app name (or create a new app) when we have a new logo + // TODO: Get Pushover to change our app name (or create a new app) when we have a new logo [FieldDefinition(0, Label = "API Key", Privacy = PrivacyLevel.ApiKey, HelpLink = "https://pushover.net/apps/clone/lidarr")] public string ApiKey { get; set; } diff --git a/src/NzbDrone.Core/Notifications/Telegram/TelegramService.cs b/src/NzbDrone.Core/Notifications/Telegram/TelegramService.cs index be0ab5da6..cc09b80ce 100644 --- a/src/NzbDrone.Core/Notifications/Telegram/TelegramService.cs +++ b/src/NzbDrone.Core/Notifications/Telegram/TelegramService.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 b19210070..a6646bdac 100644 --- a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs +++ b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs @@ -61,7 +61,7 @@ namespace NzbDrone.Core.Organizer private static readonly Regex ScenifyRemoveChars = new Regex(@"(?<=\s)(,|<|>|\/|\\|;|:|'|""|\||`|~|!|\?|@|$|%|^|\*|-|_|=){1}(?=\s)|('|:|\?|,)(?=(?:(?:s|m)\s)|\s|$)|(\(|\)|\[|\]|\{|\})", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly Regex ScenifyReplaceChars = new Regex(@"[\/]", RegexOptions.Compiled | RegexOptions.IgnoreCase); - //TODO: Support Written numbers (One, Two, etc) and Roman Numerals (I, II, III etc) + // TODO: Support Written numbers (One, Two, etc) and Roman Numerals (I, II, III etc) private static readonly Regex MultiPartCleanupRegex = new Regex(@"(?:\(\d+\)|(Part|Pt\.?)\s?\d+)$", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly char[] TrackTitleTrimCharacters = new[] { ' ', '.', '?' }; @@ -330,12 +330,12 @@ namespace NzbDrone.Core.Organizer var qualityTitle = _qualityDefinitionService.Get(trackFile.Quality.Quality).Title; var qualityProper = GetQualityProper(trackFile.Quality); - //var qualityReal = GetQualityReal(artist, trackFile.Quality); + // var qualityReal = GetQualityReal(artist, trackFile.Quality); tokenHandlers["{Quality Full}"] = m => string.Format("{0}", qualityTitle); tokenHandlers["{Quality Title}"] = m => qualityTitle; tokenHandlers["{Quality Proper}"] = m => qualityProper; - //tokenHandlers["{Quality Real}"] = m => qualityReal; + // tokenHandlers["{Quality Real}"] = m => qualityReal; } private void AddMediaInfoTokens(Dictionary> tokenHandlers, TrackFile trackFile) @@ -496,7 +496,7 @@ namespace NzbDrone.Core.Organizer private string CleanupTrackTitle(string title) { - //this will remove (1),(2) from the end of multi part episodes. + // this will remove (1),(2) from the end of multi part episodes. return MultiPartCleanupRegex.Replace(title, string.Empty).Trim(); } @@ -515,15 +515,15 @@ namespace NzbDrone.Core.Organizer return string.Empty; } - //private string GetQualityReal(Series series, QualityModel quality) - //{ + // private string GetQualityReal(Series series, QualityModel quality) + // { // if (quality.Revision.Real > 0) // { // return "REAL"; // } - // return string.Empty; - //} + // return string.Empty; + // } private string GetOriginalTitle(TrackFile trackFile) { if (trackFile.SceneName.IsNullOrWhiteSpace()) diff --git a/src/NzbDrone.Core/Organizer/FileNameValidation.cs b/src/NzbDrone.Core/Organizer/FileNameValidation.cs index 6159fb8eb..fb59d38de 100644 --- a/src/NzbDrone.Core/Organizer/FileNameValidation.cs +++ b/src/NzbDrone.Core/Organizer/FileNameValidation.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Core.Organizer ruleBuilder.SetValidator(new IllegalCharactersValidator()); return ruleBuilder.SetValidator(new RegularExpressionValidator(FileNameBuilder.AlbumTitleRegex)).WithMessage("Must contain Album title"); - //.SetValidator(new RegularExpressionValidator(FileNameBuilder.ReleaseDateRegex)).WithMessage("Must contain Release year"); + // .SetValidator(new RegularExpressionValidator(FileNameBuilder.ReleaseDateRegex)).WithMessage("Must contain Release year"); } } diff --git a/src/NzbDrone.Core/Organizer/FileNameValidationService.cs b/src/NzbDrone.Core/Organizer/FileNameValidationService.cs index 606b445aa..f705d8443 100644 --- a/src/NzbDrone.Core/Organizer/FileNameValidationService.cs +++ b/src/NzbDrone.Core/Organizer/FileNameValidationService.cs @@ -15,18 +15,18 @@ namespace NzbDrone.Core.Organizer { var validationFailure = new ValidationFailure("StandardTrackFormat", ERROR_MESSAGE); - //TODO Add Validation for TrackFilename - //var parsedEpisodeInfo = Parser.Parser.ParseTitle(sampleResult.FileName); + // TODO Add Validation for TrackFilename + // var parsedEpisodeInfo = Parser.Parser.ParseTitle(sampleResult.FileName); - //if (parsedEpisodeInfo == null) - //{ + // if (parsedEpisodeInfo == null) + // { // return validationFailure; - //} + // } - //if (!ValidateSeasonAndEpisodeNumbers(sampleResult.Episodes, parsedEpisodeInfo)) - //{ + // if (!ValidateSeasonAndEpisodeNumbers(sampleResult.Episodes, parsedEpisodeInfo)) + // { // return validationFailure; - //} + // } return null; } } diff --git a/src/NzbDrone.Core/Parser/IsoLanguages.cs b/src/NzbDrone.Core/Parser/IsoLanguages.cs index b0493dd7b..b10dc7e40 100644 --- a/src/NzbDrone.Core/Parser/IsoLanguages.cs +++ b/src/NzbDrone.Core/Parser/IsoLanguages.cs @@ -48,7 +48,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) @@ -61,7 +61,7 @@ namespace NzbDrone.Core.Parser } else if (langCode.Length == 3) { - //Lookup ISO639-2T code + // Lookup ISO639-2T code return All.FirstOrDefault(l => l.ThreeLetterCode == langCode); } diff --git a/src/NzbDrone.Core/Parser/Model/ParsedTrackInfo.cs b/src/NzbDrone.Core/Parser/Model/ParsedTrackInfo.cs index 567564695..2e454a6bf 100644 --- a/src/NzbDrone.Core/Parser/Model/ParsedTrackInfo.cs +++ b/src/NzbDrone.Core/Parser/Model/ParsedTrackInfo.cs @@ -6,7 +6,7 @@ namespace NzbDrone.Core.Parser.Model { public class ParsedTrackInfo { - //public int TrackNumber { get; set; } + // public int TrackNumber { get; set; } public string Title { get; set; } public string CleanTitle { get; set; } public string ArtistTitle { get; set; } diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index f2a9c9192..cf1b81bfa 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -40,89 +40,89 @@ namespace NzbDrone.Core.Parser private static readonly Regex[] ReportAlbumTitleRegex = new[] { - //ruTracker - (Genre) [Source]? Artist - Discography + // ruTracker - (Genre) [Source]? Artist - Discography new Regex(@"^(?:\(.+?\))(?:\W*(?:\[(?.+?)\]))?\W*(?.+?)(?: - )(?Discography|Discografia).+?(?\d{4}).+?(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist - Discography with two years + // Artist - Discography with two years new Regex(@"^(?.+?)(?: - )(?:.+?)?(?Discography|Discografia).+?(?\d{4}).+?(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist - Discography with end year + // Artist - Discography with end year new Regex(@"^(?.+?)(?: - )(?:.+?)?(?Discography|Discografia).+?(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist Discography with two years + // Artist Discography with two years new Regex(@"^(?.+?)\W*(?Discography|Discografia).+?(?\d{4}).+?(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist Discography with end year + // Artist Discography with end year new Regex(@"^(?.+?)\W*(?Discography|Discografia).+?(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist Discography + // Artist Discography new Regex(@"^(?.+?)\W*(?Discography|Discografia)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //ruTracker - (Genre) [Source]? Artist - Album - Year + // ruTracker - (Genre) [Source]? Artist - Album - Year new Regex(@"^(?:\(.+?\))(?:\W*(?:\[(?.+?)\]))?\W*(?.+?)(?: - )(?.+?)(?: - )(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist-Album-Version-Source-Year - //ex. Imagine Dragons-Smoke And Mirrors-Deluxe Edition-2CD-FLAC-2015-JLM + // Artist-Album-Version-Source-Year + // ex. Imagine Dragons-Smoke And Mirrors-Deluxe Edition-2CD-FLAC-2015-JLM new Regex(@"^(?.+?)[-](?.+?)[-](?:[\(|\[]?)(?.+?(?:Edition)?)(?:[\)|\]]?)[-](?\d?CD|WEB).+?(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist-Album-Source-Year - //ex. Dani_Sbert-Togheter-WEB-2017-FURY + // Artist-Album-Source-Year + // ex. Dani_Sbert-Togheter-WEB-2017-FURY new Regex(@"^(?.+?)[-](?.+?)[-](?\d?CD|WEB).+?(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist - Album (Year) Strict + // Artist - Album (Year) Strict new Regex(@"^(?:(?.+?)(?: - )+)(?.+?)\W*(?:\(|\[).+?(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist - Album (Year) + // Artist - Album (Year) new Regex(@"^(?:(?.+?)(?: - )+)(?.+?)\W*(?:\(|\[)(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist - Album - Year [something] + // Artist - Album - Year [something] new Regex(@"^(?:(?.+?)(?: - )+)(?.+?)\W*(?: - )(?\d{4})\W*(?:\(|\[)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist - Album [something] or Artist - Album (something) + // Artist - Album [something] or Artist - Album (something) new Regex(@"^(?:(?.+?)(?: - )+)(?.+?)\W*(?:\(|\[)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist - Album Year + // Artist - Album Year new Regex(@"^(?:(?.+?)(?: - )+)(?.+?)\W*(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist-Album (Year) Strict - //Hyphen no space between artist and album + // Artist-Album (Year) Strict + // Hyphen no space between artist and album new Regex(@"^(?:(?.+?)(?:-)+)(?.+?)\W*(?:\(|\[).+?(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist-Album (Year) - //Hyphen no space between artist and album + // Artist-Album (Year) + // Hyphen no space between artist and album new Regex(@"^(?:(?.+?)(?:-)+)(?.+?)\W*(?:\(|\[)(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist-Album [something] or Artist-Album (something) - //Hyphen no space between artist and album + // Artist-Album [something] or Artist-Album (something) + // Hyphen no space between artist and album new Regex(@"^(?:(?.+?)(?:-)+)(?.+?)\W*(?:\(|\[)", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist-Album-something-Year + // Artist-Album-something-Year new Regex(@"^(?:(?.+?)(?:-)+)(?.+?)(?:-.+?)(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist-Album Year - //Hyphen no space between artist and album + // Artist-Album Year + // Hyphen no space between artist and album new Regex(@"^(?:(?.+?)(?:-)+)(?:(?.+?)(?:-)+)(?\d{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled), - //Artist - Year - Album + // Artist - Year - Album // Hyphen with no or more spaces between artist/album/year new Regex(@"^(?:(?.+?)(?:-))(?\d{4})(?:-)(?[^-]+)", RegexOptions.IgnoreCase | RegexOptions.Compiled), @@ -141,16 +141,16 @@ 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), - //b00bs - Started appearing January 2015 + // b00bs - Started appearing January 2015 new Regex(@"^b00bs$", RegexOptions.Compiled | RegexOptions.IgnoreCase) }; @@ -163,7 +163,7 @@ namespace NzbDrone.Core.Parser private static readonly Regex FileExtensionRegex = new Regex(@"\.[a-z0-9]{2,4}$", RegexOptions.IgnoreCase | RegexOptions.Compiled); - //TODO Rework this Regex for Music + // TODO Rework this Regex for Music private static readonly RegexReplace SimpleTitleRegex = new RegexReplace(@"(?:(480|720|1080|2160|320)[ip]|[xh][\W_]?26[45]|DD\W?5\W1|[<>*:|]|848x480|1280x720|1920x1080|3840x2160|4096x2160|(8|10)b(it)?)\s*", string.Empty, RegexOptions.IgnoreCase | RegexOptions.Compiled); diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index e6c5174c3..f95d6fee4 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -238,7 +238,7 @@ namespace NzbDrone.Core.Parser break; } - //Based on extension + // Based on extension if (result.Quality == Quality.Unknown && !name.ContainsInvalidPathChars()) { try @@ -248,8 +248,8 @@ namespace NzbDrone.Core.Parser } catch (ArgumentException) { - //Swallow exception for cases where string contains illegal - //path characters. + // Swallow exception for cases where string contains illegal + // path characters. } } @@ -340,7 +340,7 @@ namespace NzbDrone.Core.Parser private static BitRate ParseBitRate(string name) { - //var nameWithNoSpaces = Regex.Replace(name, @"\s+", ""); + // var nameWithNoSpaces = Regex.Replace(name, @"\s+", ""); var match = BitRateRegex.Match(name); if (!match.Success) @@ -644,7 +644,7 @@ namespace NzbDrone.Core.Parser result.Revision.Version = Convert.ToInt32(versionRegexResult.Groups["version"].Value); } - //TODO: re-enable this when we have a reliable way to determine real + // TODO: re-enable this when we have a reliable way to determine real MatchCollection realRegexResult = RealRegex.Matches(name); if (realRegexResult.Count > 0) diff --git a/src/NzbDrone.Core/Parser/SceneChecker.cs b/src/NzbDrone.Core/Parser/SceneChecker.cs index 24220d1bd..10b092bd7 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 bool IsSceneTitle(string title) { if (!title.Contains(".")) diff --git a/src/NzbDrone.Core/RootFolders/RootFolderService.cs b/src/NzbDrone.Core/RootFolders/RootFolderService.cs index cb85af184..760467166 100644 --- a/src/NzbDrone.Core/RootFolders/RootFolderService.cs +++ b/src/NzbDrone.Core/RootFolders/RootFolderService.cs @@ -65,7 +65,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 : IBasicRepository 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 dd51a9d7a..5f1b25e19 100644 --- a/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs +++ b/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs @@ -169,7 +169,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 b8c0da4df..2cc9773e8 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 10784f85a..c4ab09f9b 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.ArtistName.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.Test.Common/LoggingTest.cs b/src/NzbDrone.Test.Common/LoggingTest.cs index 2bb704971..0c2cbe728 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();