Enforce comment spacing with Stylecop

Fixes #3104
pull/3107/head
Qstick 2 years ago
parent 52fc5ae1ea
commit c02b66ec44

@ -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

@ -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; }
}

@ -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<ArtistResource> resources)
//{
// private void PopulateAlternateTitles(List<ArtistResource> 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);

@ -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,

@ -28,7 +28,7 @@ namespace Lidarr.Api.V1.Calendar
[HttpGet]
public List<AlbumResource> 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;

@ -61,7 +61,7 @@ namespace Lidarr.Api.V1.Calendar
var occurrence = calendar.Create<CalendarEvent>();
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;

@ -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,

@ -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; }

@ -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" };
}

@ -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
};
}
}

@ -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,

@ -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,

@ -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())
};

@ -40,7 +40,7 @@ namespace Lidarr.Api.V1.Qualities
[HttpPut("update")]
public object UpdateMany([FromBody] List<QualityDefinitionResource> resource)
{
//Read from request
// Read from request
var qualityDefinitions = resource
.ToModel()
.ToList();

@ -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; }
}

@ -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,
};

@ -15,7 +15,7 @@ namespace Lidarr.Http.Extensions
// See src/Lidarr.Api.V1/Queue/QueueModule.cs
private static readonly HashSet<string> VALID_SORT_KEYS = new HashSet<string>(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",

@ -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));

@ -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);

@ -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"",")]

@ -14,7 +14,7 @@ namespace NzbDrone.Common.Test
[TestFixture]
public class ServiceProviderFixture : TestBase<ServiceProvider>
{
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]

@ -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;

@ -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();
}

@ -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();
}
/// <summary>

@ -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")]

@ -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);

@ -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);
}

@ -89,7 +89,7 @@ namespace NzbDrone.Core.Test
{
var result = new List<int>().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<int>().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);
}

@ -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);

@ -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));

@ -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()

@ -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()

@ -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;

@ -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);
}
}

@ -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)

@ -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)

@ -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();
}
}

@ -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);

@ -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);

@ -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<IMetadataProfileRepository>()

@ -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<IProfileRepository>()

@ -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();
});
}

@ -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; }

@ -64,7 +64,7 @@ namespace NzbDrone.Core.Datastore
{
version = db.QueryFirstOrDefault<string>("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

@ -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;

@ -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);

@ -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";

@ -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;

@ -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();
}

@ -82,7 +82,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
var filter = new Dictionary<string, object>();
// TODO: get_torrents_status returns the files as well, which starts to cause deluge timeouts when you get enough season packs.
//var response = ProcessRequest<Dictionary<String, DelugeTorrent>>(settings, "core.get_torrents_status", filter, new String[0]);
// var response = ProcessRequest<Dictionary<String, DelugeTorrent>>(settings, "core.get_torrents_status", filter, new String[0]);
var response = ProcessRequest<DelugeUpdateUIResult>(settings, "web.update_ui", RequiredProperties, filter);
return GetTorrents(response);
@ -93,7 +93,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
var filter = new Dictionary<string, object>();
filter.Add("label", label);
//var response = ProcessRequest<Dictionary<String, DelugeTorrent>>(settings, "core.get_torrents_status", filter, new String[0]);
// var response = ProcessRequest<Dictionary<String, DelugeTorrent>>(settings, "core.get_torrents_status", filter, new String[0]);
var response = ProcessRequest<DelugeUpdateUIResult>(settings, "web.update_ui", RequiredProperties, filter);
return GetTorrents(response);

@ -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);

@ -209,7 +209,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
if (!Json.TryDeserialize<SabnzbdJsonError>(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))

@ -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")

@ -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;
}

@ -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; }
}
}

@ -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.");

@ -40,7 +40,7 @@ namespace NzbDrone.Core.Download
var grabbed = new List<DownloadDecision>();
var pending = new List<DownloadDecision>();
//var failed = new List<DownloadDecision>();
// var failed = new List<DownloadDecision>();
var rejected = decisions.Where(d => d.Rejected).ToList();
var pendingAddQueue = new List<Tuple<DownloadDecision, PendingReleaseReason>>();
@ -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<DownloadDecision> GetQualifiedReports(IEnumerable<DownloadDecision> 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();
}

@ -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)

@ -19,7 +19,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads
Messages = new List<string> { message };
}
//Constructor for use when deserializing JSON
// Constructor for use when deserializing JSON
public TrackedDownloadStatusMessage()
{
}

@ -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;
}

@ -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;
}

@ -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);

@ -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);

@ -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);

@ -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('+', ' ');

@ -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}",

@ -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);

@ -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();

@ -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");
}
}
}

@ -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);

@ -88,7 +88,7 @@ namespace NzbDrone.Core.MediaFiles
public List<TrackFile> 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<TrackFile>(new SqlBuilder(_database.DatabaseType).Select(typeof(TrackFile))
.LeftJoin<TrackFile, Track>((f, t) => f.Id == t.TrackFileId)

@ -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;

@ -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())));

@ -85,7 +85,7 @@ namespace NzbDrone.Core.Messaging.Events
subscribers = target as EventSubscribers<TEvent>;
}
//call synchronous handlers first.
// call synchronous handlers first.
var handlers = subscribers._syncHandlers;
foreach (var handler in handlers)

@ -207,7 +207,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
return new List<Artist> { 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<Artist> { GetArtistInfo(searchGuid.ToString(), metadataProfile) };
}

@ -57,7 +57,7 @@ namespace NzbDrone.Core.Music
[MemberwiseEqualityIgnore]
public LazyLoaded<Artist> Artist { get; set; }
//compatibility properties with old version of Album
// compatibility properties with old version of Album
[MemberwiseEqualityIgnore]
[JsonIgnore]
public int ArtistId

@ -42,7 +42,7 @@ namespace NzbDrone.Core.Music
[MemberwiseEqualityIgnore]
public LazyLoaded<List<Album>> Albums { get; set; }
//compatibility properties
// compatibility properties
[MemberwiseEqualityIgnore]
public string Name
{

@ -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)
{

@ -92,7 +92,7 @@ namespace NzbDrone.Core.Music
public List<Track> 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<Track, AlbumRelease>((t, r) => t.AlbumReleaseId == r.Id)

@ -27,7 +27,7 @@ namespace NzbDrone.Core.Music
var qualitiesBelowCutoff = new List<QualitiesBelowCutoff>();
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);

@ -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);
}

@ -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];

@ -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 };
}

@ -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<EmbyMediaFolder> GetArtist(MediaBrowserSettings settings)

@ -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;
}

@ -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; }

@ -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 = $"<b>{HttpUtility.HtmlEncode(title)}</b>\n{HttpUtility.HtmlEncode(message)}";
var requestBuilder = new HttpRequestBuilder(URL).Resource("bot{token}/sendmessage").Post();

@ -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)

@ -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<string, Func<TokenMatch, string>> 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())

@ -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");
}
}

@ -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;
}
}

@ -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);
}

@ -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; }

@ -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*(?:\[(?<source>.+?)\]))?\W*(?<artist>.+?)(?: - )(?<discography>Discography|Discografia).+?(?<startyear>\d{4}).+?(?<endyear>\d{4})",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist - Discography with two years
// Artist - Discography with two years
new Regex(@"^(?<artist>.+?)(?: - )(?:.+?)?(?<discography>Discography|Discografia).+?(?<startyear>\d{4}).+?(?<endyear>\d{4})",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist - Discography with end year
// Artist - Discography with end year
new Regex(@"^(?<artist>.+?)(?: - )(?:.+?)?(?<discography>Discography|Discografia).+?(?<endyear>\d{4})",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist Discography with two years
// Artist Discography with two years
new Regex(@"^(?<artist>.+?)\W*(?<discography>Discography|Discografia).+?(?<startyear>\d{4}).+?(?<endyear>\d{4})",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist Discography with end year
// Artist Discography with end year
new Regex(@"^(?<artist>.+?)\W*(?<discography>Discography|Discografia).+?(?<endyear>\d{4})",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist Discography
// Artist Discography
new Regex(@"^(?<artist>.+?)\W*(?<discography>Discography|Discografia)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//ruTracker - (Genre) [Source]? Artist - Album - Year
// ruTracker - (Genre) [Source]? Artist - Album - Year
new Regex(@"^(?:\(.+?\))(?:\W*(?:\[(?<source>.+?)\]))?\W*(?<artist>.+?)(?: - )(?<album>.+?)(?: - )(?<releaseyear>\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(@"^(?<artist>.+?)[-](?<album>.+?)[-](?:[\(|\[]?)(?<version>.+?(?:Edition)?)(?:[\)|\]]?)[-](?<source>\d?CD|WEB).+?(?<releaseyear>\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(@"^(?<artist>.+?)[-](?<album>.+?)[-](?<source>\d?CD|WEB).+?(?<releaseyear>\d{4})",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist - Album (Year) Strict
// Artist - Album (Year) Strict
new Regex(@"^(?:(?<artist>.+?)(?: - )+)(?<album>.+?)\W*(?:\(|\[).+?(?<releaseyear>\d{4})",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist - Album (Year)
// Artist - Album (Year)
new Regex(@"^(?:(?<artist>.+?)(?: - )+)(?<album>.+?)\W*(?:\(|\[)(?<releaseyear>\d{4})",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist - Album - Year [something]
// Artist - Album - Year [something]
new Regex(@"^(?:(?<artist>.+?)(?: - )+)(?<album>.+?)\W*(?: - )(?<releaseyear>\d{4})\W*(?:\(|\[)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist - Album [something] or Artist - Album (something)
// Artist - Album [something] or Artist - Album (something)
new Regex(@"^(?:(?<artist>.+?)(?: - )+)(?<album>.+?)\W*(?:\(|\[)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist - Album Year
// Artist - Album Year
new Regex(@"^(?:(?<artist>.+?)(?: - )+)(?<album>.+?)\W*(?<releaseyear>\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(@"^(?:(?<artist>.+?)(?:-)+)(?<album>.+?)\W*(?:\(|\[).+?(?<releaseyear>\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(@"^(?:(?<artist>.+?)(?:-)+)(?<album>.+?)\W*(?:\(|\[)(?<releaseyear>\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(@"^(?:(?<artist>.+?)(?:-)+)(?<album>.+?)\W*(?:\(|\[)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist-Album-something-Year
// Artist-Album-something-Year
new Regex(@"^(?:(?<artist>.+?)(?:-)+)(?<album>.+?)(?:-.+?)(?<releaseyear>\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(@"^(?:(?<artist>.+?)(?:-)+)(?:(?<album>.+?)(?:-)+)(?<releaseyear>\d{4})",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Artist - Year - Album
// Artist - Year - Album
// Hyphen with no or more spaces between artist/album/year
new Regex(@"^(?:(?<artist>.+?)(?:-))(?<releaseyear>\d{4})(?:-)(?<album>[^-]+)",
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);

@ -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)

@ -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("."))

@ -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);

@ -5,6 +5,6 @@ namespace NzbDrone.Core.ThingiProvider
public interface IProviderRepository<TProvider> : IBasicRepository<TProvider>
where TProvider : ModelBase, new()
{
// void DeleteImplementations(string implementation);
// void DeleteImplementations(string implementation);
}
}

@ -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();

@ -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)

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save