mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-24 06:27:08 -04:00
Enforce comment style in CS
This commit is contained in:
parent
d37fac5343
commit
44d7c54077
149 changed files with 351 additions and 352 deletions
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -394,7 +394,7 @@ namespace NzbDrone.Common.Test.DiskTests
|
|||
var destination = new DirectoryInfo(GetTempFilePath());
|
||||
Subject.TransferFolder(source.FullName, destination.FullName, TransferMode.Copy);
|
||||
|
||||
//Delete Random File
|
||||
// Delete Random File
|
||||
destination.GetFiles("*.*", SearchOption.AllDirectories).First().Delete();
|
||||
|
||||
Subject.TransferFolder(source.FullName, destination.FullName, TransferMode.Copy);
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace NzbDrone.Common.Test
|
|||
[TestFixture]
|
||||
public class ServiceProviderTests : 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]
|
||||
|
|
|
@ -204,7 +204,7 @@ namespace NzbDrone.Common.EnvironmentInfo
|
|||
|
||||
private static bool InternalIsOfficialBuild()
|
||||
{
|
||||
//Official builds will never have such a high revision
|
||||
// Official builds will never have such a high revision
|
||||
if (BuildInfo.Version.Major >= 10 || BuildInfo.Version.Revision > 10000)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace NzbDrone.Common.Extensions
|
|||
|
||||
var info = new FileInfo(path.Trim());
|
||||
|
||||
//UNC
|
||||
// UNC
|
||||
if (OsInfo.IsWindows && info.FullName.StartsWith(@"\\"))
|
||||
{
|
||||
return info.FullName.TrimEnd('/', '\\', ' ');
|
||||
|
@ -168,7 +168,7 @@ namespace NzbDrone.Common.Extensions
|
|||
var parentDirInfo = dirInfo.Parent;
|
||||
if (parentDirInfo == null)
|
||||
{
|
||||
//Drive letter
|
||||
// Drive letter
|
||||
return dirInfo.Name.ToUpper();
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -73,17 +73,17 @@ namespace NzbDrone.Core.Test.Datastore.Migration
|
|||
|
||||
var mediainfo = items.First().MediaInfo;
|
||||
|
||||
//Removed props should be null
|
||||
// Removed props should be null
|
||||
mediainfo.AudioChannels.Should().BeNull();
|
||||
mediainfo.AudioChannelPositionsText.Should().BeNull();
|
||||
|
||||
//Renamed should have original value
|
||||
// Renamed should have original value
|
||||
mediainfo.AudioChannelsContainer.Should().NotBeNull();
|
||||
mediainfo.AudioChannelPositionsTextContainer.Should().NotBeNull();
|
||||
mediainfo.AudioChannelsContainer.Should().Be(6);
|
||||
mediainfo.AudioChannelPositionsTextContainer.Should().Be("Front: L C R, Side: L R, LFE");
|
||||
|
||||
//Should not touch other props
|
||||
// Should not touch other props
|
||||
mediainfo.AudioChannelPositions.Should().Be("3/2/0.1");
|
||||
}
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
result.Should().HaveCount(1);
|
||||
|
||||
//result.First().RemoteMovie.DownloadAllowed.Should().BeFalse();
|
||||
// result.First().RemoteMovie.DownloadAllowed.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -249,7 +249,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
result.Should().HaveCount(1);
|
||||
|
||||
//result.First().RemoteMovie.DownloadAllowed.Should().BeFalse();
|
||||
// result.First().RemoteMovie.DownloadAllowed.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
_upgradeHistory.IsSatisfiedBy(_parseResultSingle, null).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
// [Test]
|
||||
// [Test]
|
||||
// public void should_return_true_if_latest_history_has_a_download_id_and_cdh_is_enabled()
|
||||
// {
|
||||
// GivenMostRecentForEpisode(FIRST_EPISODE_ID, "test", _notupgradableQuality, DateTime.UtcNow, HistoryEventType.Grabbed);
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
{
|
||||
[TestFixture]
|
||||
|
||||
//TODO: Update for custom qualities!
|
||||
// TODO: Update for custom qualities!
|
||||
public class PrioritizeDownloadDecisionFixture : CoreTest<DownloadDecisionPriorizationService>
|
||||
{
|
||||
private CustomFormat _customFormat1;
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests.RssSync
|
|||
|
||||
private void GivenExistingFile(QualityModel quality)
|
||||
{
|
||||
//_remoteEpisode.Episodes.First().EpisodeFileId = 1;
|
||||
// _remoteEpisode.Episodes.First().EpisodeFileId = 1;
|
||||
_remoteMovie.Movie.MovieFile = new MovieFile { Quality = quality };
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests.Search
|
|||
Title = "Series.Title.S01.720p.BluRay.X264-RlsGrp",
|
||||
Seeders = 0,
|
||||
|
||||
//IndexerSettings = new TorrentRssIndexerSettings {MinimumSeeders = 5}
|
||||
// IndexerSettings = new TorrentRssIndexerSettings {MinimumSeeders = 5}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -70,8 +70,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
|
|||
VerifyIdentifiable(downloadClientItem);
|
||||
downloadClientItem.RemainingSize.Should().NotBe(0);
|
||||
|
||||
//downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero);
|
||||
//downloadClientItem.OutputPath.Should().NotBeNullOrEmpty();
|
||||
// downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero);
|
||||
// downloadClientItem.OutputPath.Should().NotBeNullOrEmpty();
|
||||
downloadClientItem.Status.Should().Be(DownloadItemStatus.Queued);
|
||||
}
|
||||
|
||||
|
@ -81,8 +81,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
|
|||
|
||||
downloadClientItem.RemainingSize.Should().NotBe(0);
|
||||
|
||||
//downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero);
|
||||
//downloadClientItem.OutputPath.Should().NotBeNullOrEmpty();
|
||||
// downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero);
|
||||
// downloadClientItem.OutputPath.Should().NotBeNullOrEmpty();
|
||||
downloadClientItem.Status.Should().Be(DownloadItemStatus.Paused);
|
||||
}
|
||||
|
||||
|
@ -92,8 +92,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
|
|||
|
||||
downloadClientItem.RemainingSize.Should().NotBe(0);
|
||||
|
||||
//downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero);
|
||||
//downloadClientItem.OutputPath.Should().NotBeNullOrEmpty();
|
||||
// downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero);
|
||||
// downloadClientItem.OutputPath.Should().NotBeNullOrEmpty();
|
||||
downloadClientItem.Status.Should().Be(DownloadItemStatus.Downloading);
|
||||
}
|
||||
|
||||
|
@ -101,8 +101,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
|
|||
{
|
||||
VerifyIdentifiable(downloadClientItem);
|
||||
|
||||
//downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero);
|
||||
//downloadClientItem.OutputPath.Should().NotBeNullOrEmpty();
|
||||
// downloadClientItem.RemainingTime.Should().NotBe(TimeSpan.Zero);
|
||||
// downloadClientItem.OutputPath.Should().NotBeNullOrEmpty();
|
||||
downloadClientItem.Status.Should().Be(DownloadItemStatus.Downloading);
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
|
|||
downloadClientItem.RemainingSize.Should().Be(0);
|
||||
downloadClientItem.RemainingTime.Should().Be(TimeSpan.Zero);
|
||||
|
||||
//downloadClientItem.OutputPath.Should().NotBeNullOrEmpty();
|
||||
// downloadClientItem.OutputPath.Should().NotBeNullOrEmpty();
|
||||
downloadClientItem.Status.Should().Be(DownloadItemStatus.Completed);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
|
|||
|
||||
_remoteMovie = new RemoteMovie();
|
||||
|
||||
//_remoteEpisode.Episodes = new List<Episode>{ _episode };
|
||||
// _remoteEpisode.Episodes = new List<Episode>{ _episode };
|
||||
_remoteMovie.Movie = _movie;
|
||||
_remoteMovie.ParsedMovieInfo = _parsedMovieInfo;
|
||||
_remoteMovie.Release = _release;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,13 +32,13 @@ namespace NzbDrone.Core.Test.Framework
|
|||
Mocker.SetConstant<IRadarrCloudRequestBuilder>(new RadarrCloudRequestBuilder());
|
||||
}
|
||||
|
||||
//Used for tests that rely on parsing working correctly.
|
||||
// Used for tests that rely on parsing working correctly.
|
||||
protected void UseRealParsingService()
|
||||
{
|
||||
//Mocker.SetConstant<IParsingService>(new ParsingService(Mocker.Resolve<MovieService>(), Mocker.Resolve<ConfigService>(), Mocker.Resolve<QualityDefinitionService>(), TestLogger));
|
||||
// Mocker.SetConstant<IParsingService>(new ParsingService(Mocker.Resolve<MovieService>(), Mocker.Resolve<ConfigService>(), Mocker.Resolve<QualityDefinitionService>(), TestLogger));
|
||||
}
|
||||
|
||||
//Used for tests that rely on parsing working correctly. Does some minimal parsing using the old static methods.
|
||||
// Used for tests that rely on parsing working correctly. Does some minimal parsing using the old static methods.
|
||||
protected void ParseMovieTitle()
|
||||
{
|
||||
Mocker.GetMock<IParsingService>().Setup(c => c.ParseMovieInfo(It.IsAny<string>(), It.IsAny<System.Collections.Generic.List<object>>()))
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace NzbDrone.Core.Test.IndexerTests.NyaaTests
|
|||
torrentInfo.CommentUrl.Should().BeNullOrEmpty();
|
||||
torrentInfo.Indexer.Should().Be(Subject.Definition.Name);
|
||||
torrentInfo.PublishDate.Should().Be(DateTime.Parse("Tue, 24 Aug 2021 22:18:46"));
|
||||
torrentInfo.Size.Should().Be(639211930); //609.6 MiB
|
||||
torrentInfo.Size.Should().Be(639211930); // 609.6 MiB
|
||||
torrentInfo.MagnetUrl.Should().Be(null);
|
||||
torrentInfo.Seeders.Should().Be(4);
|
||||
torrentInfo.Peers.Should().Be(3 + 4);
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace NzbDrone.Core.Test.IndexerTests.PTPTests
|
|||
first.DownloadUrl.Should().Be("https://passthepopcorn.me/torrents.php?action=download&id=452135&authkey=00000000000000000000000000000000&torrent_pass=00000000000000000000000000000000");
|
||||
first.InfoUrl.Should().Be("https://passthepopcorn.me/torrents.php?id=148131&torrentid=452135");
|
||||
|
||||
//first.PublishDate.Should().Be(DateTime.Parse("2017-04-17T12:13:42+0000").ToUniversalTime()); stupid timezones
|
||||
// first.PublishDate.Should().Be(DateTime.Parse("2017-04-17T12:13:42+0000").ToUniversalTime()); stupid timezones
|
||||
first.Size.Should().Be(2466170624L);
|
||||
first.InfoHash.Should().BeNullOrEmpty();
|
||||
first.MagnetUrl.Should().BeNullOrEmpty();
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace NzbDrone.Core.Test.MediaFiles
|
|||
{
|
||||
ParseMovieTitle();
|
||||
|
||||
//UseRealParsingService();
|
||||
// UseRealParsingService();
|
||||
Mocker.GetMock<IDiskScanService>().Setup(c => c.GetVideoFiles(It.IsAny<string>(), It.IsAny<bool>()))
|
||||
.Returns(_videoFiles);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MovieImport
|
|||
{
|
||||
[TestFixture]
|
||||
|
||||
//TODO: Update all of this for movies.
|
||||
// TODO: Update all of this for movies.
|
||||
public class ImportApprovedMoviesFixture : CoreTest<ImportApprovedMovie>
|
||||
{
|
||||
private List<ImportDecision> _rejectedDecisions;
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MovieImport
|
|||
{
|
||||
[TestFixture]
|
||||
|
||||
//TODO: Add tests to ensure helpers for augmenters are correctly passed.
|
||||
// TODO: Add tests to ensure helpers for augmenters are correctly passed.
|
||||
public class ImportDecisionMakerFixture : CoreTest<ImportDecisionMaker>
|
||||
{
|
||||
private List<string> _videoFiles;
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MovieImport.Specifications
|
|||
.Build();
|
||||
}
|
||||
|
||||
//TODO: Decide whether to reimplement this!
|
||||
// TODO: Decide whether to reimplement this!
|
||||
|
||||
/*[Test]
|
||||
public void should_be_accepted_for_existing_file()
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace NzbDrone.Core.Test.MetadataSource.SkyHook
|
|||
movie.Studio.Should().NotBeNullOrWhiteSpace();
|
||||
movie.Runtime.Should().BeGreaterThan(0);
|
||||
|
||||
//series.TvRageId.Should().BeGreaterThan(0);
|
||||
// series.TvRageId.Should().BeGreaterThan(0);
|
||||
movie.TmdbId.Should().BeGreaterThan(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace NzbDrone.Core.Test.MovieTests
|
|||
_movie.MinimumAvailability = minimumAvailability;
|
||||
}
|
||||
|
||||
//minAvail = TBA
|
||||
// minAvail = TBA
|
||||
[TestCase(null, null, null, MovieStatusType.TBA, true)]
|
||||
[TestCase("2000/01/01 21:10:42", null, null, MovieStatusType.TBA, true)]
|
||||
[TestCase("2100/01/01 21:10:42", null, null, MovieStatusType.TBA, true)]
|
||||
|
@ -36,7 +36,7 @@ namespace NzbDrone.Core.Test.MovieTests
|
|||
[TestCase(null, null, "2000/01/01 21:10:42", MovieStatusType.TBA, true)]
|
||||
[TestCase(null, null, "2100/01/01 21:10:42", MovieStatusType.TBA, true)]
|
||||
|
||||
//minAvail = Announced
|
||||
// minAvail = Announced
|
||||
[TestCase(null, null, null, MovieStatusType.Announced, true)]
|
||||
[TestCase("2000/01/01 21:10:42", null, null, MovieStatusType.Announced, true)]
|
||||
[TestCase("2100/01/01 21:10:42", null, null, MovieStatusType.Announced, true)]
|
||||
|
@ -45,33 +45,33 @@ namespace NzbDrone.Core.Test.MovieTests
|
|||
[TestCase(null, null, "2000/01/01 21:10:42", MovieStatusType.Announced, true)]
|
||||
[TestCase(null, null, "2100/01/01 21:10:42", MovieStatusType.Announced, true)]
|
||||
|
||||
//minAvail = InCinemas
|
||||
//InCinemas is known and in the past others are not known or in future
|
||||
// minAvail = InCinemas
|
||||
// InCinemas is known and in the past others are not known or in future
|
||||
[TestCase("2000/01/01 21:10:42", null, null, MovieStatusType.InCinemas, true)]
|
||||
[TestCase("2000/01/01 21:10:42", "2100/01/01 21:10:42", null, MovieStatusType.InCinemas, true)]
|
||||
[TestCase("2000/01/01 21:10:42", "2100/01/01 21:10:42", "2100/01/01 21:10:42", MovieStatusType.InCinemas, true)]
|
||||
[TestCase("2000/01/01 21:10:42", null, "2100/01/01 21:10:42", MovieStatusType.InCinemas, true)]
|
||||
|
||||
//InCinemas is known and in the future others are not known or in future
|
||||
// InCinemas is known and in the future others are not known or in future
|
||||
[TestCase("2100/01/01 21:10:42", null, null, MovieStatusType.InCinemas, false)]
|
||||
[TestCase("2100/01/01 21:10:42", "2100/01/01 21:10:42", null, MovieStatusType.InCinemas, false)]
|
||||
[TestCase("2100/01/01 21:10:42", "2100/01/01 21:10:42", "2100/01/01 21:10:42", MovieStatusType.InCinemas, false)]
|
||||
[TestCase("2100/01/01 21:10:42", null, "2100/01/01 21:10:42", MovieStatusType.InCinemas, false)]
|
||||
|
||||
//handle the cases where InCinemas date is not known but Digital/Physical are and passed -- this refers to the issue being fixed along with these tests
|
||||
// handle the cases where InCinemas date is not known but Digital/Physical are and passed -- this refers to the issue being fixed along with these tests
|
||||
[TestCase(null, "2000/01/01 21:10:42", null, MovieStatusType.InCinemas, true)]
|
||||
[TestCase(null, "2000/01/01 21:10:42", "2000/01/01 21:10:42", MovieStatusType.InCinemas, true)]
|
||||
[TestCase(null, null, "2000/01/01 21:10:42", MovieStatusType.InCinemas, true)]
|
||||
|
||||
//same as previous but digital/physical are in future
|
||||
// same as previous but digital/physical are in future
|
||||
[TestCase(null, "2100/01/01 21:10:42", null, MovieStatusType.InCinemas, false)]
|
||||
[TestCase(null, "2100/01/01 21:10:42", "2100/01/01 21:10:42", MovieStatusType.InCinemas, false)]
|
||||
[TestCase(null, null, "2100/01/01 21:10:42", MovieStatusType.InCinemas, false)]
|
||||
|
||||
//no date values
|
||||
// no date values
|
||||
[TestCase(null, null, null, MovieStatusType.InCinemas, false)]
|
||||
|
||||
//minAvail = Released
|
||||
// minAvail = Released
|
||||
[TestCase(null, null, null, MovieStatusType.Released, false)]
|
||||
[TestCase("2000/01/01 21:10:42", null, null, MovieStatusType.Released, true)]
|
||||
[TestCase("2100/01/01 21:10:42", null, null, MovieStatusType.Released, false)]
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace NzbDrone.Core.Test.MovieTests
|
|||
[TestFixture]
|
||||
public class MovieTitleNormalizerFixture
|
||||
{
|
||||
//TODO: Decide on reimplementing this!
|
||||
// TODO: Decide on reimplementing this!
|
||||
/*
|
||||
[TestCase("A to Z", 281588, "a to z")]
|
||||
[TestCase("A. D. - The Trials & Triumph of the Early Church", 266757, "ad trials triumph early church")]
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
|||
[TestCase("backslash \\ backlash", "backslash backlash")]
|
||||
[TestCase("I'm the Boss", "Im the Boss")]
|
||||
|
||||
//[TestCase("", "")]
|
||||
// [TestCase("", "")]
|
||||
public void should_get_expected_title_back(string title, string expected)
|
||||
{
|
||||
_series.Title = title;
|
||||
|
|
|
@ -332,7 +332,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
|||
.Should().Be("30 Rock - 30.Rock.S01E01.xvid-LOL");
|
||||
}
|
||||
|
||||
//TODO: Update this test or fix the underlying issue!
|
||||
// TODO: Update this test or fix the underlying issue!
|
||||
/*
|
||||
[Test]
|
||||
public void should_replace_double_period_with_single_period()
|
||||
|
|
|
@ -110,7 +110,7 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[TestCase("Joe.Movie.2.EXTENDED.EDITION.2015.German.DL.PAL.DVDR-ETM", "Joe Movie 2", "EXTENDED EDITION", 2015)]
|
||||
[TestCase("Movie.EXTENDED.2011.HDRip.AC3.German.XviD-POE", "Movie", "EXTENDED", 2011)]
|
||||
|
||||
//Special cases (see description)
|
||||
// Special cases (see description)
|
||||
[TestCase("Movie.Klasse.von.1999.1990.German.720p.HDTV.x264-NORETAiL", "Movie Klasse von 1999", "", 1990, Description = "year in the title")]
|
||||
[TestCase("Movie.Squad.2016.EXTENDED.German.DL.AC3.BDRip.x264-hqc", "Movie Squad", "EXTENDED", 2016, Description = "edition after year")]
|
||||
[TestCase("Movie.and.Movie.2010.Extended.Cut.German.DTS.DL.720p.BluRay.x264-HDS", "Movie and Movie", "Extended Cut", 2010, Description = "edition after year")]
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests.AugmentersTests
|
|||
{
|
||||
base.Setup();
|
||||
|
||||
//Add multi indexer
|
||||
// Add multi indexer
|
||||
GivenIndexerSettings(new RarbgSettings
|
||||
{
|
||||
MultiLanguages = new List<int>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
//using FluentAssertions;
|
||||
//using NUnit.Framework;
|
||||
//using NzbDrone.Core.CustomFormats;
|
||||
//using NzbDrone.Core.MediaFiles.MediaInfo;
|
||||
//using NzbDrone.Core.Parser;
|
||||
//using NzbDrone.Core.Parser.Augmenters;
|
||||
//using NzbDrone.Core.Qualities;
|
||||
// using FluentAssertions;
|
||||
// using NUnit.Framework;
|
||||
// using NzbDrone.Core.CustomFormats;
|
||||
// using NzbDrone.Core.MediaFiles.MediaInfo;
|
||||
// using NzbDrone.Core.Parser;
|
||||
// using NzbDrone.Core.Parser.Augmenters;
|
||||
// using NzbDrone.Core.Qualities;
|
||||
|
||||
//namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests.AugmentersTests
|
||||
//{
|
||||
// namespace NzbDrone.Core.Test.ParserTests.ParsingServiceTests.AugmentersTests
|
||||
// {
|
||||
// [TestFixture]
|
||||
// public class AugmentWithMediaInfoFixture : AugmentMovieInfoFixture<AugmentWithMediaInfo>
|
||||
// {
|
||||
|
@ -22,7 +22,7 @@
|
|||
// };
|
||||
// MovieInfo.Quality = quality;
|
||||
|
||||
// var realWidth = 480;
|
||||
// var realWidth = 480;
|
||||
// switch (realResolution)
|
||||
// {
|
||||
// case Resolution.R720p:
|
||||
|
@ -35,19 +35,19 @@
|
|||
// realWidth = 2160;
|
||||
// break;
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// var mediaInfo = new MediaInfoModel
|
||||
// var mediaInfo = new MediaInfoModel
|
||||
// {
|
||||
// Width = realWidth
|
||||
// };
|
||||
|
||||
// var movieInfo = Subject.AugmentMovieInfo(MovieInfo, mediaInfo);
|
||||
// var movieInfo = Subject.AugmentMovieInfo(MovieInfo, mediaInfo);
|
||||
// movieInfo.Quality.Resolution.Should().BeEquivalentTo(realResolution);
|
||||
// movieInfo.Quality.QualityDetectionSource.Should().BeEquivalentTo(QualityDetectionSource.MediaInfo);
|
||||
// }
|
||||
|
||||
// [TestCase(Resolution.R720P, Source.BLURAY, Resolution.R1080P, Modifier.BRDISK)]
|
||||
// [TestCase(Resolution.R720P, Source.BLURAY, Resolution.R1080P, Modifier.BRDISK)]
|
||||
// [TestCase(Resolution.R1080P, Source.BLURAY, Resolution.R720P, Modifier.REMUX)]
|
||||
// [TestCase(Resolution.R480P, Source.BLURAY, Resolution.R720P)]
|
||||
// [TestCase(Resolution.R720P, Source.DVD, Resolution.R480P)]
|
||||
|
@ -60,9 +60,9 @@
|
|||
// Modifier = modifier,
|
||||
// };
|
||||
|
||||
// MovieInfo.Quality = quality;
|
||||
// MovieInfo.Quality = quality;
|
||||
|
||||
// var realWidth = 480;
|
||||
// var realWidth = 480;
|
||||
// switch (realResolution)
|
||||
// {
|
||||
// case Resolution.R720P:
|
||||
|
@ -75,16 +75,16 @@
|
|||
// realWidth = 2160;
|
||||
// break;
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// var mediaInfo = new MediaInfoModel
|
||||
// var mediaInfo = new MediaInfoModel
|
||||
// {
|
||||
// Width = realWidth
|
||||
// };
|
||||
|
||||
// var movieInfo = Subject.AugmentMovieInfo(MovieInfo, mediaInfo);
|
||||
// var movieInfo = Subject.AugmentMovieInfo(MovieInfo, mediaInfo);
|
||||
// movieInfo.Quality.Resolution.Should().BeEquivalentTo(resolution);
|
||||
// movieInfo.Quality.QualityDetectionSource.Should().BeEquivalentTo(QualityDetectionSource.Name);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
// }
|
||||
|
|
|
@ -13,10 +13,10 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
//QualityDefinitionServiceFixture.SetupDefaultDefinitions();
|
||||
// QualityDefinitionServiceFixture.SetupDefaultDefinitions();
|
||||
}
|
||||
|
||||
//public static object[] SelfQualityParserCases = QualityDefinition.DefaultQualityDefinitions.ToArray();
|
||||
// public static object[] SelfQualityParserCases = QualityDefinition.DefaultQualityDefinitions.ToArray();
|
||||
public static object[] OtherSourceQualityParserCases =
|
||||
{
|
||||
new object[] { "SD TV", Source.TV, Resolution.R480p, Modifier.NONE },
|
||||
|
|
|
@ -35,8 +35,8 @@ namespace NzbDrone.Core.Test.Profiles
|
|||
|
||||
[Test]
|
||||
|
||||
//This confirms that new profiles are added only if no other profiles exists.
|
||||
//We don't want to keep adding them back if a user deleted them on purpose.
|
||||
// This confirms that new profiles are added only if no other profiles exists.
|
||||
// We don't want to keep adding them back if a user deleted them on purpose.
|
||||
public void Init_should_skip_if_any_profiles_already_exist()
|
||||
{
|
||||
Mocker.GetMock<IProfileRepository>()
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace NzbDrone.Core.Test.Qualities
|
|||
new object[] { 8, Quality.WEBDL480p },
|
||||
new object[] { 9, Quality.HDTV1080p },
|
||||
|
||||
//new object[] {10, Quality.RAWHD},
|
||||
// new object[] {10, Quality.RAWHD},
|
||||
new object[] { 16, Quality.HDTV2160p },
|
||||
new object[] { 18, Quality.WEBDL2160p },
|
||||
new object[] { 19, Quality.Bluray2160p },
|
||||
|
@ -44,7 +44,7 @@ namespace NzbDrone.Core.Test.Qualities
|
|||
new object[] { Quality.WEBDL480p, 8 },
|
||||
new object[] { Quality.HDTV1080p, 9 },
|
||||
|
||||
//new object[] {Quality.RAWHD, 10},
|
||||
// new object[] {Quality.RAWHD, 10},
|
||||
new object[] { Quality.HDTV2160p, 16 },
|
||||
new object[] { Quality.WEBDL2160p, 18 },
|
||||
new object[] { Quality.Bluray2160p, 19 },
|
||||
|
|
|
@ -272,13 +272,13 @@ namespace NzbDrone.Core.Configuration
|
|||
return valueHolder.First().Value.Trim();
|
||||
}
|
||||
|
||||
//Save the value
|
||||
// Save the value
|
||||
if (persist)
|
||||
{
|
||||
SetValue(key, defaultValue);
|
||||
}
|
||||
|
||||
//return the default value
|
||||
// return the default value
|
||||
return defaultValue.ToString();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -13,17 +13,17 @@ namespace NzbDrone.Core.Configuration
|
|||
|
||||
bool IsDefined(string key);
|
||||
|
||||
//Download Client
|
||||
// Download Client
|
||||
string DownloadClientWorkingFolders { get; set; }
|
||||
int DownloadClientHistoryLimit { get; set; }
|
||||
int CheckForFinishedDownloadInterval { get; set; }
|
||||
|
||||
//Completed/Failed Download Handling (Download client)
|
||||
// Completed/Failed Download Handling (Download client)
|
||||
bool EnableCompletedDownloadHandling { get; set; }
|
||||
|
||||
bool AutoRedownloadFailed { get; set; }
|
||||
|
||||
//Media Management
|
||||
// Media Management
|
||||
bool AutoUnmonitorPreviouslyDownloadedMovies { get; set; }
|
||||
string RecycleBin { get; set; }
|
||||
int RecycleBinCleanupDays { get; set; }
|
||||
|
@ -40,12 +40,12 @@ namespace NzbDrone.Core.Configuration
|
|||
RescanAfterRefreshType RescanAfterRefresh { get; set; }
|
||||
bool AutoRenameFolders { get; set; }
|
||||
|
||||
//Permissions (Media Management)
|
||||
// Permissions (Media Management)
|
||||
bool SetPermissionsLinux { get; set; }
|
||||
string ChmodFolder { get; set; }
|
||||
string ChownGroup { get; set; }
|
||||
|
||||
//Indexers
|
||||
// Indexers
|
||||
int Retention { get; set; }
|
||||
int RssSyncInterval { get; set; }
|
||||
int MaximumSize { get; set; }
|
||||
|
@ -62,10 +62,10 @@ namespace NzbDrone.Core.Configuration
|
|||
string ListSyncLevel { get; set; }
|
||||
string ImportExclusions { get; set; }
|
||||
|
||||
//Metadata Provider
|
||||
// Metadata Provider
|
||||
TMDbCountryCode CertificationCountry { get; set; }
|
||||
|
||||
//UI
|
||||
// UI
|
||||
int FirstDayOfWeek { get; set; }
|
||||
string CalendarWeekColumnHeader { get; set; }
|
||||
MovieRuntimeFormatType MovieRuntimeFormat { get; set; }
|
||||
|
@ -78,17 +78,17 @@ namespace NzbDrone.Core.Configuration
|
|||
int MovieInfoLanguage { get; set; }
|
||||
int UILanguage { get; set; }
|
||||
|
||||
//Internal
|
||||
// Internal
|
||||
bool CleanupMetadataImages { get; set; }
|
||||
string PlexClientIdentifier { get; }
|
||||
|
||||
//Forms Auth
|
||||
// Forms Auth
|
||||
string RijndaelPassphrase { get; }
|
||||
string HmacPassphrase { get; }
|
||||
string RijndaelSalt { get; }
|
||||
string HmacSalt { get; }
|
||||
|
||||
//Proxy
|
||||
// Proxy
|
||||
bool ProxyEnabled { get; }
|
||||
ProxyType ProxyType { get; }
|
||||
string ProxyHostname { get; }
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
//Migrations 002 - 103 were squashed in to 001, do not use these migration numbers, versions will be present in V1 migrated Radarr DBs
|
||||
// Migrations 002 - 103 were squashed in to 001, do not use these migration numbers, versions will be present in V1 migrated Radarr DBs
|
||||
public class sonarr_squashed
|
||||
{
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Alter.Table("MovieFiles").AlterColumn("Path").AsString().Nullable(); //Should be deleted, but to much work, ¯\_(ツ)_/¯
|
||||
Alter.Table("MovieFiles").AlterColumn("Path").AsString().Nullable(); // Should be deleted, but to much work, ¯\_(ツ)_/¯
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
{
|
||||
Create.Column("Edition").OnTable("MovieFiles").AsString().Nullable();
|
||||
|
||||
//Execute.WithConnection(SetSortTitles);
|
||||
// Execute.WithConnection(SetSortTitles);
|
||||
}
|
||||
|
||||
private void SetSortTitles(IDbConnection conn, IDbTransaction tran)
|
||||
|
|
|
@ -42,23 +42,23 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
|
||||
public static string ToUrlSlug(string value)
|
||||
{
|
||||
//First to lower case
|
||||
// First to lower case
|
||||
value = value.ToLowerInvariant();
|
||||
|
||||
//Remove all accents
|
||||
// Remove all accents
|
||||
var bytes = Encoding.GetEncoding("Cyrillic").GetBytes(value);
|
||||
value = Encoding.ASCII.GetString(bytes);
|
||||
|
||||
//Replace spaces
|
||||
// Replace spaces
|
||||
value = Regex.Replace(value, @"\s", "-", RegexOptions.Compiled);
|
||||
|
||||
//Remove invalid chars
|
||||
// Remove invalid chars
|
||||
value = Regex.Replace(value, @"[^a-z0-9\s-_]", "", RegexOptions.Compiled);
|
||||
|
||||
//Trim dashes from end
|
||||
// Trim dashes from end
|
||||
value = value.Trim('-', '_');
|
||||
|
||||
//Replace double occurences of - or _
|
||||
// Replace double occurences of - or _
|
||||
value = Regex.Replace(value, @"([-_]){2,}", "$1", RegexOptions.Compiled);
|
||||
|
||||
return value;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using FluentMigrator;
|
||||
|
||||
//using FluentMigrator.Expressions;
|
||||
// using FluentMigrator.Expressions;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
using NzbDrone.Core.Movies;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
//Execute.WithConnection(RenameUrlToBaseUrl);
|
||||
// Execute.WithConnection(RenameUrlToBaseUrl);
|
||||
Create.TableForModel("CustomFormats")
|
||||
.WithColumn("Name").AsString().Unique()
|
||||
.WithColumn("FormatTags").AsString();
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
//Cleanup cases of Sonarr Interference with Radarr db
|
||||
// Cleanup cases of Sonarr Interference with Radarr db
|
||||
if (Schema.Table("PendingReleases").Column("Reason").Exists())
|
||||
{
|
||||
Delete.Column("Reason").FromTable("PendingReleases");
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
|
||||
Alter.Table("MovieFiles").AddColumn("OriginalFilePath").AsString().Nullable();
|
||||
|
||||
//This is Ignored in mapping, should not be in DB
|
||||
// This is Ignored in mapping, should not be in DB
|
||||
Delete.Column("Path").FromTable("MovieFiles");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
Execute.Sql("UPDATE \"NamingConfig\" SET \"RenameMovies\"=\"RenameEpisodes\"");
|
||||
Delete.Column("RenameEpisodes").FromTable("NamingConfig");
|
||||
|
||||
//Manual SQL, Fluent Migrator doesn't support multi-column unique contraint on table creation, SQLite doesn't support adding it after creation
|
||||
// Manual SQL, Fluent Migrator doesn't support multi-column unique contraint on table creation, SQLite doesn't support adding it after creation
|
||||
IfDatabase("sqlite").Execute.Sql("CREATE TABLE \"MovieTranslations\"(" +
|
||||
"\"Id\" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " +
|
||||
"\"MovieId\" INTEGER NOT NULL, " +
|
||||
|
@ -70,7 +70,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
Execute.WithConnection(FixLanguagesMoveFile);
|
||||
Execute.WithConnection(FixLanguagesHistory);
|
||||
|
||||
//Force refresh all movies in library
|
||||
// Force refresh all movies in library
|
||||
Update.Table("ScheduledTasks")
|
||||
.Set(new { LastExecution = "2014-01-01 00:00:00" })
|
||||
.Where(new { TypeName = "NzbDrone.Core.Movies.Commands.RefreshMovieCommand" });
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
// Only process if there are lists or movies existing in the DB
|
||||
if (movieRows.Any() || listRows.Any())
|
||||
{
|
||||
//If there are no Profiles lets add the defaults
|
||||
// If there are no Profiles lets add the defaults
|
||||
if (!profiles.Any())
|
||||
{
|
||||
InsertDefaultQualityProfiles(conn, tran);
|
||||
|
@ -36,7 +36,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
|
||||
var mostCommonProfileId = 0;
|
||||
|
||||
//If we have some movies, lets determine the most common profile used and use it for the bad entries
|
||||
// If we have some movies, lets determine the most common profile used and use it for the bad entries
|
||||
if (movieRows.Any())
|
||||
{
|
||||
mostCommonProfileId = movieRows.Select(x => x.ProfileId)
|
||||
|
@ -53,11 +53,11 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
mostCommonProfileId = profiles.First();
|
||||
}
|
||||
|
||||
//Correct any Movies that reference profiles that are null
|
||||
// Correct any Movies that reference profiles that are null
|
||||
var sql = $"UPDATE \"Movies\" SET \"ProfileId\" = {mostCommonProfileId} WHERE \"Id\" IN(SELECT \"Movies\".\"Id\" FROM \"Movies\" LEFT OUTER JOIN \"Profiles\" ON \"Movies\".\"ProfileId\" = \"Profiles\".\"Id\" WHERE \"Profiles\".\"Id\" IS NULL)";
|
||||
conn.Execute(sql, transaction: tran);
|
||||
|
||||
//Correct any Lists that reference profiles that are null
|
||||
// Correct any Lists that reference profiles that are null
|
||||
sql = $"UPDATE \"NetImport\" SET \"ProfileId\" = {mostCommonProfileId} WHERE \"Id\" IN(SELECT \"NetImport\".\"Id\" FROM \"NetImport\" LEFT OUTER JOIN \"Profiles\" ON \"NetImport\".\"ProfileId\" = \"Profiles\".\"Id\" WHERE \"Profiles\".\"Id\" IS NULL)";
|
||||
conn.Execute(sql, transaction: tran);
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
{
|
||||
var profiles = new List<QualityProfile180>();
|
||||
|
||||
//Grab custom formats if any exist and add them to the new profiles
|
||||
// Grab custom formats if any exist and add them to the new profiles
|
||||
var formats = conn.Query<CustomFormat180>($"SELECT \"Id\" FROM \"CustomFormats\"").ToList();
|
||||
|
||||
profiles.Add(GetDefaultProfile("Any",
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
return;
|
||||
}
|
||||
|
||||
//Process duplicates to pick which to purge
|
||||
// Process duplicates to pick which to purge
|
||||
foreach (var problemGroup in problemMovies)
|
||||
{
|
||||
var moviesWithFiles = problemGroup.Where(m => m.MovieFileId > 0);
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
Execute.Sql("UPDATE \"MovieFiles\" SET \"MediaInfo\" = Replace(\"MediaInfo\", '\"audioChannels\"', '\"audioChannelsContainer\"');");
|
||||
Execute.Sql("UPDATE \"MovieFiles\" SET \"MediaInfo\" = Replace(\"MediaInfo\", '\"audioChannelPositionsText\"', '\"audioChannelPositionsTextContainer\"');");
|
||||
|
||||
//Change List Interval from Min to Hour
|
||||
// Change List Interval from Min to Hour
|
||||
IfDatabase("sqlite").Execute.Sql("UPDATE \"Config\" SET \"Value\" = max((\"Value\" / 60) + 1, 6) WHERE \"Key\" = 'importlistsyncinterval'");
|
||||
IfDatabase("postgres").Execute.Sql("UPDATE \"Config\" SET \"Value\" = greatest((\"Value\"::int / 60) + 1, 6) WHERE \"Key\" = 'importlistsyncinterval'");
|
||||
}
|
||||
|
|
|
@ -682,7 +682,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
var audioChannelsContainer = mediaInfo.AudioChannelsContainer;
|
||||
var audioChannelsStream = mediaInfo.AudioChannelsStream;
|
||||
|
||||
//Skip if the positions texts give us nothing
|
||||
// Skip if the positions texts give us nothing
|
||||
if ((audioChannelPositionsTextContainer.IsNullOrWhiteSpace() || audioChannelPositionsTextContainer == "Object Based") &&
|
||||
(audioChannelPositionsTextStream.IsNullOrWhiteSpace() || audioChannelPositionsTextStream == "Object Based"))
|
||||
{
|
||||
|
|
|
@ -8,15 +8,15 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
//Set PreDb entries to Released
|
||||
// Set PreDb entries to Released
|
||||
Update.Table("Movies").Set(new { MinimumAvailability = 3 }).Where(new { MinimumAvailability = 4 });
|
||||
Update.Table("ImportLists").Set(new { MinimumAvailability = 3 }).Where(new { MinimumAvailability = 4 });
|
||||
|
||||
//Should never be set, but just in case
|
||||
// Should never be set, but just in case
|
||||
Update.Table("Movies").Set(new { Status = 3 }).Where(new { Status = 4 });
|
||||
Update.Table("ImportListMovies").Set(new { Status = 3 }).Where(new { Status = 4 });
|
||||
|
||||
//Remove unused column
|
||||
// Remove unused column
|
||||
Delete.Column("HasPreDBEntry").FromTable("Movies");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
//Purge Commands before reworking tables
|
||||
// Purge Commands before reworking tables
|
||||
Delete.FromTable("Commands").AllRows();
|
||||
|
||||
IfDatabase("sqlite").Alter.Column("Id").OnTable("Movies").AsInt32().PrimaryKey().Identity();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace NzbDrone.Core.DecisionEngine
|
|||
if (result == null)
|
||||
{
|
||||
result = new MappingResult { MappingResultType = MappingResultType.NotParsable };
|
||||
result.Movie = null; //To ensure we have a remote movie, else null exception on next line!
|
||||
result.Movie = null; // To ensure we have a remote movie, else null exception on next line!
|
||||
result.RemoteMovie.ParsedMovieInfo = parsedMovieInfo;
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ namespace NzbDrone.Core.DecisionEngine
|
|||
{
|
||||
if (parsedMovieInfo.Quality.HardcodedSubs.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
//remoteMovie.DownloadAllowed = true;
|
||||
// remoteMovie.DownloadAllowed = true;
|
||||
if (_configService.AllowHardcodedSubs)
|
||||
{
|
||||
decision = GetDecisionForReport(remoteMovie, searchCriteria);
|
||||
|
|
|
@ -44,10 +44,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
|||
{
|
||||
var minSize = qualityDefinition.MinSize.Value.Megabytes();
|
||||
|
||||
//Multiply maxSize by Series.Runtime
|
||||
// Multiply maxSize by Series.Runtime
|
||||
minSize = minSize * subject.Movie.MovieMetadata.Value.Runtime;
|
||||
|
||||
//If the parsed size is smaller than minSize we don't want it
|
||||
// If the parsed size is smaller than minSize we don't want it
|
||||
if (subject.Release.Size < minSize)
|
||||
{
|
||||
var runtimeMessage = subject.Movie.Title;
|
||||
|
@ -70,10 +70,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
|||
{
|
||||
var maxSize = qualityDefinition.MaxSize.Value.Megabytes();
|
||||
|
||||
//Multiply maxSize by Series.Runtime
|
||||
// Multiply maxSize by Series.Runtime
|
||||
maxSize = maxSize * subject.Movie.MovieMetadata.Value.Runtime;
|
||||
|
||||
//If the parsed size is greater than maxSize we don't want it
|
||||
// If the parsed size is greater than maxSize we don't want it
|
||||
if (subject.Release.Size > maxSize)
|
||||
{
|
||||
_logger.Debug("Item: {0}, Size: {1} is greater than maximum allowed size ({2} for {3}), rejecting", subject, subject.Release.Size, maxSize, subject.Movie.Title);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -39,13 +39,13 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic
|
|||
var title = remoteMovie.Release.Title;
|
||||
|
||||
// We don't have full seasons in movies.
|
||||
//if (remoteMovie.ParsedEpisodeInfo.FullSeason)
|
||||
//{
|
||||
// if (remoteMovie.ParsedEpisodeInfo.FullSeason)
|
||||
// {
|
||||
// throw new NotSupportedException("Full season releases are not supported with Pneumatic.");
|
||||
//}
|
||||
// }
|
||||
title = FileNameBuilder.CleanFileName(title);
|
||||
|
||||
//Save to the Pneumatic directory (The user will need to ensure its accessible by XBMC)
|
||||
// Save to the Pneumatic directory (The user will need to ensure its accessible by XBMC)
|
||||
var nzbFile = Path.Combine(Settings.NzbFolder, title + ".nzb");
|
||||
|
||||
_logger.Debug("Downloading NZB from: {0} to: {1}", url, nzbFile);
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace NzbDrone.Core.Download.Pending
|
|||
public ReleaseInfo Release { get; set; }
|
||||
public PendingReleaseReason Reason { get; set; }
|
||||
|
||||
//Not persisted
|
||||
// Not persisted
|
||||
public RemoteMovie RemoteMovie { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ namespace NzbDrone.Core.Download.Pending
|
|||
}
|
||||
}
|
||||
|
||||
//Return best quality release for each movie
|
||||
// Return best quality release for each movie
|
||||
var deduped = queued.GroupBy(q => q.Movie.Id).Select(g =>
|
||||
{
|
||||
var movies = g.First().Movie;
|
||||
|
@ -359,8 +359,8 @@ namespace NzbDrone.Core.Download.Pending
|
|||
var compare = new QualityModelComparer(profile).Compare(remoteMovie.ParsedMovieInfo.Quality,
|
||||
existingReport.RemoteMovie.ParsedMovieInfo.Quality);
|
||||
|
||||
//Only remove lower/equal quality pending releases
|
||||
//It is safer to retry these releases on the next round than remove it and try to re-add it (if its still in the feed)
|
||||
// Only remove lower/equal quality pending releases
|
||||
// It is safer to retry these releases on the next round than remove it and try to re-add it (if its still in the feed)
|
||||
if (compare >= 0)
|
||||
{
|
||||
_logger.Debug("Removing previously pending release, as it was grabbed.");
|
||||
|
|
|
@ -114,7 +114,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.RemoteMovie.Movie != null).ToList();
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads
|
|||
.ToList();
|
||||
var grabbedHistoryItem = historyItems.FirstOrDefault(h => h.EventType == MovieHistoryEventType.Grabbed);
|
||||
|
||||
//TODO: Create release info from history and use that here, so we don't loose indexer flags!
|
||||
// TODO: Create release info from history and use that here, so we don't loose indexer flags!
|
||||
var parsedMovieInfo = _parsingService.ParseMovieInfo(trackedDownload.DownloadItem.Title, new List<object> { grabbedHistoryItem });
|
||||
|
||||
if (parsedMovieInfo != 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
|
||||
private TrackedDownloadStatusMessage()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Roksbox
|
|||
_logger = logger;
|
||||
}
|
||||
|
||||
//Re-enable when/if we store and use mpaa certification
|
||||
//private static List<string> ValidCertification = new List<string> { "G", "NC-17", "PG", "PG-13", "R", "UR", "UNRATED", "NR", "TV-Y", "TV-Y7", "TV-Y7-FV", "TV-G", "TV-PG", "TV-14", "TV-MA" };
|
||||
// Re-enable when/if we store and use mpaa certification
|
||||
// private static List<string> ValidCertification = new List<string> { "G", "NC-17", "PG", "PG-13", "R", "UR", "UNRATED", "NR", "TV-Y", "TV-Y7", "TV-Y7-FV", "TV-G", "TV-PG", "TV-14", "TV-MA" };
|
||||
public override string Name => "Roksbox";
|
||||
|
||||
public override string GetFilenameAfterMove(Movie movie, MovieFile movieFile, MetadataFile metadataFile)
|
||||
|
|
|
@ -135,7 +135,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Wdtv
|
|||
return new List<ImageFileResult>();
|
||||
}
|
||||
|
||||
//Because we only support one image, attempt to get the Poster type, then if that fails grab the first
|
||||
// Because we only support one image, attempt to get the Poster type, then if that fails grab the first
|
||||
var image = movie.MovieMetadata.Value.Images.SingleOrDefault(c => c.CoverType == MediaCoverTypes.Poster) ?? movie.MovieMetadata.Value.Images.FirstOrDefault();
|
||||
if (image == null)
|
||||
{
|
||||
|
|
|
@ -340,7 +340,7 @@ namespace NzbDrone.Core.Extras.Metadata
|
|||
return null;
|
||||
}
|
||||
|
||||
//Remove duplicate metadata files from DB and disk
|
||||
// Remove duplicate metadata files from DB and disk
|
||||
foreach (var file in matchingMetadataFiles.Skip(1))
|
||||
{
|
||||
var path = Path.Combine(movie.Path, file.RelativePath);
|
||||
|
|
|
@ -182,7 +182,7 @@ namespace NzbDrone.Core.History
|
|||
|
||||
if (downloadId.IsNullOrWhiteSpace())
|
||||
{
|
||||
downloadId = FindDownloadId(message); //For now fuck off.
|
||||
downloadId = FindDownloadId(message); // For now fuck off.
|
||||
}
|
||||
|
||||
var movie = message.MovieInfo.Movie;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace NzbDrone.Core.ImportLists.CouchPotato
|
|||
public string[] actors { get; set; }
|
||||
public string[] writers { get; set; }
|
||||
|
||||
//public int? runtime { get; set; }
|
||||
// public int? runtime { get; set; }
|
||||
public string type { get; set; }
|
||||
public string released { get; set; }
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace NzbDrone.Core.ImportLists
|
|||
if (blockedLists.TryGetValue(importList.Definition.Id, out ImportListStatus blockedListStatus))
|
||||
{
|
||||
_logger.Debug("Temporarily ignoring list {0} till {1} due to recent failures.", importList.Definition.Name, blockedListStatus.DisabledTill.Value.ToLocalTime());
|
||||
result.AnyFailure |= true; //Ensure we don't clean if a list is down
|
||||
result.AnyFailure |= true; // Ensure we don't clean if a list is down
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace NzbDrone.Core.ImportLists.RSSImport
|
|||
}
|
||||
catch (Exception itemEx)
|
||||
{
|
||||
//itemEx.Data.Add("Item", item.Title());
|
||||
// itemEx.Data.Add("Item", item.Title());
|
||||
_logger.Error(itemEx, "An error occurred while processing list feed item from {0}", importResponse.Request.Url);
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ namespace NzbDrone.Core.ImportLists.RSSImport
|
|||
|
||||
releaseInfo = ProcessItem(item, releaseInfo);
|
||||
|
||||
//_logger.Trace("Parsed: {0}", releaseInfo.Title);
|
||||
// _logger.Trace("Parsed: {0}", releaseInfo.Title);
|
||||
return PostProcess(item, releaseInfo);
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ namespace NzbDrone.Core.ImportLists.RSSImport
|
|||
}
|
||||
|
||||
releaseInfo.Title = title;
|
||||
var result = Parser.Parser.ParseMovieTitle(title); //Depreciated anyways
|
||||
var result = Parser.Parser.ParseMovieTitle(title); // Depreciated anyways
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
|
|
|
@ -16,10 +16,10 @@ namespace NzbDrone.Core.ImportLists.RSSImport
|
|||
return pageableRequests;
|
||||
}
|
||||
|
||||
//public ImportListPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria)
|
||||
//{
|
||||
// public ImportListPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria)
|
||||
// {
|
||||
// return new ImportListPageableRequestChain();
|
||||
//}
|
||||
// }
|
||||
private IEnumerable<ImportListRequest> GetMovies(string searchParameters)
|
||||
{
|
||||
var request = new ImportListRequest($"{Settings.Link.Trim()}", HttpAccept.Rss);
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace NzbDrone.Core.ImportLists.RadarrList
|
|||
}
|
||||
catch (JsonSerializationException)
|
||||
{
|
||||
//No error!
|
||||
// No error!
|
||||
}
|
||||
|
||||
if (importListResponse.HttpResponse.StatusCode != System.Net.HttpStatusCode.OK)
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace NzbDrone.Core.ImportLists.RadarrList2.IMDbList
|
|||
|
||||
if (_settings.ListId.StartsWith("ls", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
//Parse TSV response from IMDB export
|
||||
// Parse TSV response from IMDB export
|
||||
var rows = importResponse.Content.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
movies = rows.Skip(1).SelectList(m => m.Split(',')).Where(m => m.Length > 1).SelectList(i => new ImportListMovie { ImdbId = i[1] });
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace NzbDrone.Core.ImportLists.RadarrList2.IMDbList
|
|||
|
||||
protected override HttpRequest GetHttpRequest()
|
||||
{
|
||||
//Use IMDb list Export for user lists to bypass RadarrAPI caching
|
||||
// Use IMDb list Export for user lists to bypass RadarrAPI caching
|
||||
if (Settings.ListId.StartsWith("ls", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return new HttpRequest($"https://www.imdb.com/list/{Settings.ListId}/export", new HttpAccept("*/*"));
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace NzbDrone.Core.ImportLists.TMDb.List
|
|||
|
||||
foreach (var movie in jsonResponse.Results)
|
||||
{
|
||||
//Media Type is not Movie
|
||||
// Media Type is not Movie
|
||||
if (movie.MediaType != "movie")
|
||||
{
|
||||
continue;
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace NzbDrone.Core.IndexerSearch.Definitions
|
|||
cleanTitle = SpecialCharacter.Replace(cleanTitle, "");
|
||||
cleanTitle = NonWord.Replace(cleanTitle, "+");
|
||||
|
||||
//remove any repeating +s
|
||||
// remove any repeating +s
|
||||
cleanTitle = Regex.Replace(cleanTitle, @"\+{2,}", "+");
|
||||
cleanTitle = cleanTitle.RemoveAccent();
|
||||
return cleanTitle.Trim('+', ' ');
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace NzbDrone.Core.IndexerSearch
|
|||
movie.MovieMetadata.Value.OriginalTitle
|
||||
};
|
||||
|
||||
//Add Translation of wanted languages to search query
|
||||
// Add Translation of wanted languages to search query
|
||||
foreach (var translation in translations.Where(a => wantedLanguages.Contains(a.Language)))
|
||||
{
|
||||
queryTranlations.Add(translation.Title);
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace NzbDrone.Core.Indexers
|
|||
{
|
||||
var generator = GetRequestGenerator();
|
||||
|
||||
//A func ensures cookies are always updated to the latest. This way, the first page could update the cookies and then can be reused by the second page.
|
||||
// A func ensures cookies are always updated to the latest. This way, the first page could update the cookies and then can be reused by the second page.
|
||||
generator.GetCookies = () =>
|
||||
{
|
||||
var cookies = _indexerStatusService.GetIndexerCookies(Definition.Id);
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace NzbDrone.Core.Indexers.Omgwtfnzbs
|
|||
|
||||
protected override string GetInfoUrl(XElement item)
|
||||
{
|
||||
//Todo: Me thinks I need to parse details to get this...
|
||||
// Todo: Me thinks I need to parse details to get this...
|
||||
var match = Regex.Match(item.Description(),
|
||||
@"(?:\<b\>View NZB\:\<\/b\>\s\<a\shref\=\"")(?<URL>.+?)(?:\"")",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
|
|
@ -67,12 +67,12 @@ namespace NzbDrone.Core.Indexers.PassThePopcorn
|
|||
|
||||
if (torrent.GoldenPopcorn)
|
||||
{
|
||||
flags |= IndexerFlags.PTP_Golden; //title = $"{title} 🍿";
|
||||
flags |= IndexerFlags.PTP_Golden; // title = $"{title} 🍿";
|
||||
}
|
||||
|
||||
if (torrent.Checked)
|
||||
{
|
||||
flags |= IndexerFlags.PTP_Approved; //title = $"{title} ✔";
|
||||
flags |= IndexerFlags.PTP_Approved; // title = $"{title} ✔";
|
||||
}
|
||||
|
||||
if (torrent.FreeleechType == "Freeleech")
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.Indexers.Rarbg
|
|||
public long size { get; set; }
|
||||
public DateTime pubdate { get; set; }
|
||||
|
||||
//This is named episode_info for movies as well as shows
|
||||
// This is named episode_info for movies as well as shows
|
||||
public RarbgTorrentInfo episode_info { get; set; }
|
||||
public int? ranked { get; set; }
|
||||
public string info_page { get; set; }
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -212,7 +212,7 @@ namespace NzbDrone.Core.Jobs
|
|||
|
||||
private int GetImportListSyncInterval()
|
||||
{
|
||||
//Enforce 6 hour min on list sync
|
||||
// Enforce 6 hour min on list sync
|
||||
var interval = Math.Max(_configService.ImportListSyncInterval, 6);
|
||||
|
||||
return interval * 60;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -12,10 +12,10 @@ namespace NzbDrone.Core.MediaFiles
|
|||
{
|
||||
_fileExtensions = new Dictionary<string, Quality>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
//Unknown
|
||||
// Unknown
|
||||
{ ".webm", Quality.Unknown },
|
||||
|
||||
//SDTV
|
||||
// SDTV
|
||||
{ ".m4v", Quality.SDTV },
|
||||
{ ".3gp", Quality.SDTV },
|
||||
{ ".nsv", Quality.SDTV },
|
||||
|
@ -55,18 +55,18 @@ namespace NzbDrone.Core.MediaFiles
|
|||
{ ".flv", Quality.SDTV },
|
||||
{ ".wpl", Quality.SDTV },
|
||||
|
||||
//DVD
|
||||
// DVD
|
||||
{ ".img", Quality.DVD },
|
||||
{ ".iso", Quality.DVD },
|
||||
{ ".vob", Quality.DVD },
|
||||
|
||||
//HD
|
||||
// HD
|
||||
{ ".mkv", Quality.WEBDL720p },
|
||||
{ ".mk3d", Quality.WEBDL720p },
|
||||
{ ".ts", Quality.SDTV },
|
||||
{ ".wtv", Quality.SDTV },
|
||||
|
||||
//Bluray
|
||||
// Bluray
|
||||
{ ".m2ts", Quality.Bluray720p }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||
|
||||
public void Delete(MovieFile movieFile, DeleteMediaFileReason reason)
|
||||
{
|
||||
//Little hack so we have the movie attached for the event consumers
|
||||
// Little hack so we have the movie attached for the event consumers
|
||||
if (movieFile.Movie == null)
|
||||
{
|
||||
movieFile.Movie = _movieRepository.Get(movieFile.MovieId);
|
||||
|
|
|
@ -77,25 +77,25 @@ namespace NzbDrone.Core.MediaFiles.MovieImport
|
|||
|
||||
private int GetMinimumAllowedRuntime(MovieMetadata movie)
|
||||
{
|
||||
//Anime short - 15 seconds
|
||||
// Anime short - 15 seconds
|
||||
if (movie.Runtime <= 3)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
|
||||
//Webisodes - 90 seconds
|
||||
// Webisodes - 90 seconds
|
||||
if (movie.Runtime <= 10)
|
||||
{
|
||||
return 90;
|
||||
}
|
||||
|
||||
//30 minute episodes - 5 minutes
|
||||
// 30 minute episodes - 5 minutes
|
||||
if (movie.Runtime <= 30)
|
||||
{
|
||||
return 300;
|
||||
}
|
||||
|
||||
//60 minute episodes - 10 minutes
|
||||
// 60 minute episodes - 10 minutes
|
||||
return 600;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport
|
|||
{
|
||||
_logger.Debug("Decisions: {0}", decisions.Count);
|
||||
|
||||
//I added a null op for the rare case that the quality is null. TODO: find out why that would even happen in the first place.
|
||||
// I added a null op for the rare case that the quality is null. TODO: find out why that would even happen in the first place.
|
||||
var qualifiedImports = decisions.Where(c => c.Approved)
|
||||
.GroupBy(c => c.LocalMovie.Movie.Id, (i, s) => s
|
||||
.OrderByDescending(c => c.LocalMovie.Quality ?? new QualityModel { Quality = Quality.Unknown }, new QualityModelComparer(s.First().LocalMovie.Movie.Profile))
|
||||
|
@ -69,7 +69,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport
|
|||
|
||||
try
|
||||
{
|
||||
//check if already imported
|
||||
// check if already imported
|
||||
if (importResults.Select(r => r.ImportDecision.LocalMovie.Movie)
|
||||
.Select(m => m.Id).Contains(localMovie.Movie.Id))
|
||||
{
|
||||
|
@ -120,7 +120,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport
|
|||
{
|
||||
movieFile.SceneName = localMovie.SceneName;
|
||||
movieFile.OriginalFilePath = GetOriginalFilePath(downloadClientItem, localMovie);
|
||||
var moveResult = _movieFileUpgrader.UpgradeMovieFile(movieFile, localMovie, copyOnly); //TODO: Check if this works
|
||||
var moveResult = _movieFileUpgrader.UpgradeMovieFile(movieFile, localMovie, copyOnly); // TODO: Check if this works
|
||||
oldFiles = moveResult.OldFiles;
|
||||
}
|
||||
else
|
||||
|
@ -165,7 +165,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport
|
|||
}
|
||||
}
|
||||
|
||||
//Adding all the rejected decisions
|
||||
// Adding all the rejected decisions
|
||||
importResults.AddRange(decisions.Where(c => !c.Approved)
|
||||
.Select(d => new ImportResult(d, d.Rejections.Select(r => r.Reason).ToArray())));
|
||||
|
||||
|
|
|
@ -18,15 +18,15 @@ namespace NzbDrone.Core.MediaFiles.MovieImport
|
|||
LocalMovie = localMovie;
|
||||
Rejections = rejections.ToList();
|
||||
|
||||
//LocalMovie = new LocalMovie
|
||||
//{
|
||||
// LocalMovie = new LocalMovie
|
||||
// {
|
||||
// Quality = localMovie.Quality,
|
||||
// ExistingFile = localMovie.ExistingFile,
|
||||
// MediaInfo = localMovie.MediaInfo,
|
||||
// ParsedMovieInfo = localMovie.ParsedMovieInfo,
|
||||
// Path = localMovie.Path,
|
||||
// Size = localMovie.Size
|
||||
//};
|
||||
// };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -349,7 +349,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Manual
|
|||
localMovie.Languages = file.Languages;
|
||||
localMovie.ReleaseGroup = file.ReleaseGroup;
|
||||
|
||||
//TODO: Cleanup non-tracked downloads
|
||||
// TODO: Cleanup non-tracked downloads
|
||||
var importDecision = new ImportDecision(localMovie);
|
||||
|
||||
if (trackedDownload == null)
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Specifications
|
|||
return Decision.Accept();
|
||||
}
|
||||
|
||||
//TODO: Actually implement this!!!!
|
||||
// TODO: Actually implement this!!!!
|
||||
/*var folderInfo = Parser.Parser.ParseMovieTitle(dirInfo.Name, false);
|
||||
|
||||
if (folderInfo == null)
|
||||
|
|
|
@ -185,7 +185,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||
}
|
||||
catch (UnauthorizedAccessException ex)
|
||||
{
|
||||
//Handle and log permissions errors, move to next file
|
||||
// Handle and log permissions errors, move to next file
|
||||
_logger.Error(ex.Message);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||
var movie = _movieService.GetMovie(movieId);
|
||||
var file = _mediaFileService.GetFilesByMovie(movieId);
|
||||
|
||||
return GetPreviews(movie, file).OrderByDescending(m => m.MovieId).ToList(); //TODO: Would really like to not have these be lists
|
||||
return GetPreviews(movie, file).OrderByDescending(m => m.MovieId).ToList(); // TODO: Would really like to not have these be lists
|
||||
}
|
||||
|
||||
private IEnumerable<RenameMovieFilePreview> GetPreviews(Movie movie, List<MovieFile> files)
|
||||
|
|
|
@ -84,7 +84,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)
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
|
|||
public string OriginalTitle { get; set; }
|
||||
public string TitleSlug { get; set; }
|
||||
|
||||
//Depricated but left in place until cache fills new object (MovieRatings)
|
||||
// Depricated but left in place until cache fills new object (MovieRatings)
|
||||
public List<RatingItem> Ratings { get; set; }
|
||||
public RatingResource MovieRatings { get; set; }
|
||||
public int? Runtime { get; set; }
|
||||
|
|
|
@ -2,15 +2,15 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
|
|||
{
|
||||
public enum TMDbCountryCode
|
||||
{
|
||||
AU, //Australia
|
||||
BR, //Brazil
|
||||
CA, //Canada
|
||||
FR, //France
|
||||
DE, //Germany
|
||||
GB, //Great Britain
|
||||
IT, //Italy
|
||||
ES, //Spain
|
||||
US, //United States
|
||||
NZ //New Zealand
|
||||
AU, // Australia
|
||||
BR, // Brazil
|
||||
CA, // Canada
|
||||
FR, // France
|
||||
DE, // Germany
|
||||
GB, // Great Britain
|
||||
IT, // Italy
|
||||
ES, // Spain
|
||||
US, // United States
|
||||
NZ // New Zealand
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue