Compare commits
16 Commits
Author | SHA1 | Date |
---|---|---|
Mark McDowall | 3e9f445ade | |
Mark McDowall | 98c533b039 | |
Mark McDowall | d4a96e7599 | |
Mark McDowall | 5788c10b9c | |
Mark McDowall | eb2dfc1917 | |
Mark McDowall | e090843755 | |
Mark McDowall | 1824fd6682 | |
Mark McDowall | 649c5013b5 | |
Mark McDowall | a48cef49f5 | |
Mark McDowall | d6ad5ebb36 | |
Mark McDowall | 0d4bda1e1e | |
Mark McDowall | 54dc8ee35e | |
Mark McDowall | 1202c9e6d0 | |
Mark McDowall | fd89435df8 | |
Mark McDowall | d7c5f21cc6 | |
Mark McDowall | 4d9f75fe4d |
Binary file not shown.
|
@ -12,10 +12,12 @@ namespace NzbDrone.Common
|
|||
{
|
||||
private readonly EnvironmentProvider _environmentProvider;
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
private readonly string _userAgent;
|
||||
|
||||
public HttpProvider(EnvironmentProvider environmentProvider)
|
||||
{
|
||||
_environmentProvider = environmentProvider;
|
||||
_userAgent = String.Format("NzbDrone {0}", _environmentProvider.Version);
|
||||
}
|
||||
|
||||
public HttpProvider()
|
||||
|
@ -37,6 +39,7 @@ namespace NzbDrone.Common
|
|||
try
|
||||
{
|
||||
var client = new WebClient { Credentials = identity };
|
||||
client.Headers.Add(HttpRequestHeader.UserAgent, _userAgent);
|
||||
return client.DownloadString(address);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -49,7 +52,7 @@ namespace NzbDrone.Common
|
|||
public virtual Stream DownloadStream(string url, NetworkCredential credential)
|
||||
{
|
||||
var request = (HttpWebRequest)WebRequest.Create(url);
|
||||
request.UserAgent = String.Format("NzbDrone {0}", _environmentProvider.Version);
|
||||
request.UserAgent = _userAgent;
|
||||
|
||||
request.Credentials = credential;
|
||||
var response = request.GetResponse();
|
||||
|
@ -71,6 +74,7 @@ namespace NzbDrone.Common
|
|||
|
||||
var stopWatch = Stopwatch.StartNew();
|
||||
var webClient = new WebClient();
|
||||
webClient.Headers.Add(HttpRequestHeader.UserAgent, _userAgent);
|
||||
webClient.DownloadFile(url, fileName);
|
||||
stopWatch.Stop();
|
||||
logger.Trace("Downloading Completed. took {0:0}s", stopWatch.Elapsed.Seconds);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
using NLog;
|
||||
using NLog.Config;
|
||||
using NLog.Targets;
|
||||
using NzbDrone.Common.NlogTargets;
|
||||
|
||||
namespace NzbDrone.Common
|
||||
{
|
||||
|
@ -112,36 +111,6 @@ namespace NzbDrone.Common
|
|||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", level, fileTarget));
|
||||
}
|
||||
|
||||
public static void RegisterRemote()
|
||||
{
|
||||
//if (EnviromentProvider.IsProduction)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// var exceptioneerTarget = new ExceptioneerTarget();
|
||||
// LogManager.Configuration.AddTarget("Exceptioneer", exceptioneerTarget);
|
||||
// LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, exceptioneerTarget));
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// Console.WriteLine(e);
|
||||
// }
|
||||
//}
|
||||
|
||||
try
|
||||
{
|
||||
var remoteTarget = new RemoteTarget();
|
||||
LogManager.Configuration.AddTarget("RemoteTarget", remoteTarget);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, remoteTarget));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
}
|
||||
|
||||
LogManager.ConfigurationReloaded += (sender, args) => RegisterRemote();
|
||||
}
|
||||
|
||||
public static void Reload()
|
||||
{
|
||||
LogManager.Configuration.Reload();
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
using System.Linq;
|
||||
using System.Diagnostics;
|
||||
using NLog;
|
||||
using NLog.Targets;
|
||||
|
||||
namespace NzbDrone.Common.NlogTargets
|
||||
{
|
||||
public class RemoteTarget : Target
|
||||
{
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
protected override void Write(LogEventInfo logEvent)
|
||||
{
|
||||
if (logEvent == null || logEvent.Exception == null) return;
|
||||
|
||||
logger.Trace("Sending Exception to Service.NzbDrone.com . Process Name: {0}", Process.GetCurrentProcess().ProcessName);
|
||||
|
||||
ReportingService.ReportException(logEvent);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -59,10 +59,6 @@
|
|||
<Reference Include="Autofac.Configuration">
|
||||
<HintPath>..\packages\Autofac.2.6.3.862\lib\NET40\Autofac.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Exceptron.Client, Version=1.0.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Exceptron.Client.1.0.7\lib\net20\Exceptron.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
|
@ -87,7 +83,6 @@
|
|||
<Compile Include="ConsoleProvider.cs" />
|
||||
<Compile Include="Contract\ReportBase.cs" />
|
||||
<Compile Include="Contract\ParseErrorReport.cs" />
|
||||
<Compile Include="NlogTargets\RemoteTarget.cs" />
|
||||
<Compile Include="IISProvider.cs" />
|
||||
<Compile Include="Model\AuthenticationType.cs" />
|
||||
<Compile Include="PathExtentions.cs" />
|
||||
|
@ -121,6 +116,7 @@
|
|||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Exceptron.Client;
|
||||
using Exceptron.Client.Configuration;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Contract;
|
||||
|
||||
|
@ -16,7 +14,6 @@ namespace NzbDrone.Common
|
|||
private const string PARSE_URL = SERVICE_URL + "/ParseError";
|
||||
|
||||
public static RestProvider RestProvider { get; set; }
|
||||
public static ExceptronClient ExceptronClient { get; set; }
|
||||
|
||||
|
||||
private static readonly HashSet<string> parserErrorCache = new HashSet<string>();
|
||||
|
@ -57,68 +54,6 @@ namespace NzbDrone.Common
|
|||
}
|
||||
}
|
||||
|
||||
public static string ReportException(LogEventInfo logEvent)
|
||||
{
|
||||
try
|
||||
{
|
||||
VerifyDependencies();
|
||||
|
||||
var exceptionData = new ExceptionData();
|
||||
|
||||
exceptionData.Exception = logEvent.Exception;
|
||||
exceptionData.Component = logEvent.LoggerName;
|
||||
exceptionData.Message = logEvent.FormattedMessage;
|
||||
exceptionData.UserId = EnvironmentProvider.UGuid.ToString().Replace("-", string.Empty);
|
||||
|
||||
if (logEvent.Level <= LogLevel.Info)
|
||||
{
|
||||
exceptionData.Severity = ExceptionSeverity.None;
|
||||
}
|
||||
else if (logEvent.Level <= LogLevel.Warn)
|
||||
{
|
||||
exceptionData.Severity = ExceptionSeverity.Warning;
|
||||
}
|
||||
else if (logEvent.Level <= LogLevel.Error)
|
||||
{
|
||||
exceptionData.Severity = ExceptionSeverity.Error;
|
||||
}
|
||||
else if (logEvent.Level <= LogLevel.Fatal)
|
||||
{
|
||||
exceptionData.Severity = ExceptionSeverity.Fatal;
|
||||
}
|
||||
|
||||
return ExceptronClient.SubmitException(exceptionData).RefId;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (!EnvironmentProvider.IsProduction)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
if (logEvent.LoggerName != logger.Name)//prevents a recursive loop.
|
||||
{
|
||||
logger.WarnException("Unable to report exception. ", e);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static void SetupExceptronDriver()
|
||||
{
|
||||
var config = new ExceptronConfiguration
|
||||
{
|
||||
ApiKey = "CB230C312E5C4FF38B4FB9644B05E60G",
|
||||
ThrowExceptions = !EnvironmentProvider.IsProduction,
|
||||
};
|
||||
|
||||
ExceptronClient = new ExceptronClient(config)
|
||||
{
|
||||
ApplicationVersion = new EnvironmentProvider().Version.ToString()
|
||||
};
|
||||
}
|
||||
|
||||
private static void VerifyDependencies()
|
||||
{
|
||||
if (RestProvider == null)
|
||||
|
@ -133,19 +68,6 @@ namespace NzbDrone.Common
|
|||
throw new InvalidOperationException("REST Provider wasn't configured correctly.");
|
||||
}
|
||||
}
|
||||
|
||||
if (ExceptronClient == null)
|
||||
{
|
||||
if (EnvironmentProvider.IsProduction)
|
||||
{
|
||||
logger.Warn("Exceptron Driver wasn't provided. creating new one!");
|
||||
SetupExceptronDriver();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException("Exceptron Driver wasn't configured correctly.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Autofac" version="2.6.3.862" targetFramework="net40" />
|
||||
<package id="Exceptron.Client" version="1.0.7" targetFramework="net40" />
|
||||
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net40" />
|
||||
<package id="NLog" version="2.0.0.2000" />
|
||||
</packages>
|
|
@ -56,30 +56,5 @@ namespace NzbDrone.Core.Test.Integeration
|
|||
dailySeries.Should().NotBeEmpty();
|
||||
dailySeries.Should().OnlyContain(c => c > 0);
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_be_able_to_submit_exceptions()
|
||||
{
|
||||
ReportingService.SetupExceptronDriver();
|
||||
|
||||
try
|
||||
{
|
||||
ThrowException();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
var log = new LogEventInfo
|
||||
{
|
||||
LoggerName = "LoggerName.LoggerName.LoggerName.LoggerName",
|
||||
Exception = e,
|
||||
Message = "New message string. New message string.",
|
||||
};
|
||||
|
||||
var hash = ReportingService.ReportException(log);
|
||||
|
||||
hash.Should().HaveLength(8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -78,7 +78,9 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
new object[] { "Dexter - S01E01 - Title [HDTV-720p]", QualityTypes.HDTV720p, false },
|
||||
new object[] { "Dexter - S01E01 - Title [HDTV-1080p]", QualityTypes.HDTV1080p, false },
|
||||
new object[] { "POI S02E11 1080i HDTV DD5.1 MPEG2-TrollHD", QualityTypes.RAWHD, false },
|
||||
new object[] { "How I Met Your Mother S01E18 Nothing Good Happens After 2 A.M. 720p HDTV DD5.1 MPEG2-TrollHD", QualityTypes.RAWHD, false }
|
||||
new object[] { "How I Met Your Mother S01E18 Nothing Good Happens After 2 A.M. 720p HDTV DD5.1 MPEG2-TrollHD", QualityTypes.RAWHD, false },
|
||||
new object[] { "Arrested.Development.S04E01.iNTERNAL.1080p.WEBRip.x264-QRUS", QualityTypes.WEBDL1080p, false },
|
||||
new object[] { "Arrested.Development.S04E01.720p.WEBRip.AAC2.0.x264-NFRiP", QualityTypes.WEBDL720p, false }
|
||||
};
|
||||
|
||||
public static object[] SelfQualityParserCases =
|
||||
|
|
|
@ -24,6 +24,10 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
{
|
||||
new object[] { QualityTypes.SDTV, false },
|
||||
new object[] { QualityTypes.DVD, true },
|
||||
};
|
||||
|
||||
public static object[] SkipImportTestCases =
|
||||
{
|
||||
new object[] { QualityTypes.HDTV720p, false }
|
||||
};
|
||||
|
||||
|
@ -78,7 +82,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
}
|
||||
|
||||
[Test, TestCaseSource("ImportTestCases")]
|
||||
public void import_new_file_with_better_same_quality_should_succeed(QualityTypes currentFileQuality, bool currentFileProper)
|
||||
public void import_new_file_with_better_quality_should_succeed(QualityTypes currentFileQuality, bool currentFileProper)
|
||||
{
|
||||
const string newFile = @"WEEDS.S03E01.DUAL.1080p.HELLYWOOD.mkv";
|
||||
|
||||
|
@ -103,6 +107,33 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
VerifyFileImport(result, Mocker, fakeEpisode, SIZE);
|
||||
}
|
||||
|
||||
[Test, TestCaseSource("SkipImportTestCases")]
|
||||
public void import_new_file_with_same_quality_should_not_import(QualityTypes currentFileQuality, bool currentFileProper)
|
||||
{
|
||||
const string newFile = @"WEEDS.S03E01.DUAL.1080p.HELLYWOOD.mkv";
|
||||
|
||||
//Fakes
|
||||
var fakeSeries = Builder<Series>.CreateNew().Build();
|
||||
var fakeEpisode = Builder<Episode>.CreateNew()
|
||||
.With(e => e.EpisodeFile = Builder<EpisodeFile>.CreateNew()
|
||||
.With(g => g.Quality = (QualityTypes)currentFileQuality)
|
||||
.And(g => g.Proper = currentFileProper).Build()
|
||||
).Build();
|
||||
|
||||
|
||||
With80MBFile();
|
||||
|
||||
Mocker.GetMock<EpisodeProvider>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(new List<Episode> { fakeEpisode });
|
||||
|
||||
//Act
|
||||
var result = Mocker.Resolve<DiskScanProvider>().ImportFile(fakeSeries, newFile);
|
||||
|
||||
//Assert
|
||||
VerifySkipImport(result, Mocker);
|
||||
}
|
||||
|
||||
|
||||
[TestCase("WEEDS.S03E01.DUAL.DVD.XviD.AC3.-HELLYWOOD.avi")]
|
||||
[TestCase("WEEDS.S03E01.DUAL.SDTV.XviD.AC3.-HELLYWOOD.avi")]
|
||||
public void import_new_file_episode_has_same_or_better_quality_should_skip(string fileName)
|
||||
|
@ -235,10 +266,9 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
Mocker.GetMock<RecycleBinProvider>().Verify(p => p.DeleteFile(It.IsAny<string>()), Times.Once());
|
||||
}
|
||||
|
||||
[TestCase("WEEDS.S03E01.DUAL.hdtv.XviD.AC3.-HELLYWOOD.avi")]
|
||||
[TestCase("WEEDS.S03E01.DUAL.DVD.XviD.AC3.-HELLYWOOD.avi")]
|
||||
[TestCase("WEEDS.S03E01.DUAL.bluray.x264.AC3.-HELLYWOOD.mkv")]
|
||||
public void import_new_multi_part_file_episode_has_equal_or_better_quality_than_existing(string fileName)
|
||||
public void import_new_multi_part_file_episode_has_better_quality_than_existing(string fileName)
|
||||
{
|
||||
//Fakes
|
||||
var fakeSeries = Builder<Series>.CreateNew().Build();
|
||||
|
@ -267,6 +297,35 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
Mocker.GetMock<RecycleBinProvider>().Verify(p => p.DeleteFile(It.IsAny<string>()), Times.Once());
|
||||
}
|
||||
|
||||
[TestCase("WEEDS.S03E01.DUAL.hdtv.XviD.AC3.-HELLYWOOD.avi")]
|
||||
public void skip_import_new_multi_part_file_episode_has_same_quality_as_existing(string fileName)
|
||||
{
|
||||
//Fakes
|
||||
var fakeSeries = Builder<Series>.CreateNew().Build();
|
||||
|
||||
var fakeEpisodes = Builder<Episode>.CreateListOfSize(2)
|
||||
.All()
|
||||
.With(e => e.EpisodeFile = Builder<EpisodeFile>.CreateNew()
|
||||
.With(f => f.Quality = QualityTypes.SDTV)
|
||||
.Build())
|
||||
.Build();
|
||||
|
||||
With80MBFile();
|
||||
|
||||
Mocker.GetMock<MediaFileProvider>()
|
||||
.Setup(p => p.Exists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<EpisodeProvider>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(fakeEpisodes);
|
||||
|
||||
//Act
|
||||
var result = Mocker.Resolve<DiskScanProvider>().ImportFile(fakeSeries, fileName);
|
||||
|
||||
//Assert
|
||||
VerifySkipImport(result, Mocker);
|
||||
}
|
||||
|
||||
[TestCase("WEEDS.S03E01.DUAL.DVD.XviD.AC3.-HELLYWOOD.avi")]
|
||||
[TestCase("WEEDS.S03E01.DUAL.HDTV.XviD.AC3.-HELLYWOOD.avi")]
|
||||
public void skip_import_new_multi_part_file_episode_existing_has_better_quality(string fileName)
|
||||
|
|
|
@ -420,19 +420,28 @@ namespace NzbDrone.Core.Test.ProviderTests.PostDownloadProviderTests
|
|||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_if_series_path_does_not_exist()
|
||||
public void should_create_series_directory_if_series_path_does_not_exist()
|
||||
{
|
||||
var downloadName = new DirectoryInfo(@"C:\Test\Drop\30.Rock.S01E01.Pilot");
|
||||
|
||||
WithValidSeries();
|
||||
WithLotsOfFreeDiskSpace();
|
||||
WithImportedFiles(downloadName.FullName);
|
||||
|
||||
Mocker.GetMock<DiskProvider>()
|
||||
.Setup(s => s.FolderExists(fakeSeries.Path))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<SeriesProvider>().Setup(s => s.FindSeries("office")).Returns(fakeSeries);
|
||||
Mocker.GetMock<DiskScanProvider>().Setup(s => s.CleanUpDropFolder(downloadName.FullName));
|
||||
Mocker.GetMock<DiskScanProvider>().Setup(s => s.MoveEpisodeFile(It.IsAny<EpisodeFile>(), true)).Returns(new EpisodeFile());
|
||||
Mocker.GetMock<DiskProvider>().Setup(s => s.GetDirectorySize(downloadName.FullName)).Returns(Constants.IgnoreFileSize - 1.Megabytes());
|
||||
Mocker.GetMock<DiskProvider>().Setup(s => s.DeleteFolder(downloadName.FullName, true));
|
||||
Mocker.GetMock<DiskProvider>().Setup(s => s.IsFolderLocked(downloadName.FullName)).Returns(false);
|
||||
|
||||
Mocker.Resolve<PostDownloadProvider>().ProcessDownload(downloadName);
|
||||
|
||||
Mocker.GetMock<DiskProvider>().Verify(c => c.GetDirectorySize(It.IsAny<String>()), Times.Never());
|
||||
Mocker.GetMock<DiskProvider>().Verify(c => c.CreateDirectory(fakeSeries.Path), Times.Once());
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@ namespace NzbDrone.Core.Test.ProviderTests.UpdateProviderTests
|
|||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
WithStrictMocker();
|
||||
|
||||
Mocker.GetMock<ConfigProvider>().SetupGet(c => c.UpdateUrl).Returns("http://update.nzbdrone.com/_test/");
|
||||
Mocker.Resolve<HttpProvider>();
|
||||
}
|
||||
|
|
|
@ -110,7 +110,6 @@ namespace NzbDrone.Core
|
|||
{
|
||||
EnvironmentProvider.UGuid = container.Resolve<ConfigProvider>().UGuid;
|
||||
ReportingService.RestProvider = container.Resolve<RestProvider>();
|
||||
ReportingService.SetupExceptronDriver();
|
||||
}
|
||||
|
||||
private void RegisterQuality(IContainer container)
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Data;
|
||||
using Migrator.Framework;
|
||||
using NzbDrone.Common;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migrations
|
||||
{
|
||||
[Migration(20121227)]
|
||||
public class Migration20121227 : NzbDroneMigration
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Database.ExecuteNonQuery("UPDATE Config SET [Value] = 'http://update.nzbdrone.com/v1/' WHERE [Key] = 'UpdateUrl'");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -39,7 +39,7 @@ namespace NzbDrone.Core.Model.Nzbx
|
|||
public int CategoryId { get; set; }
|
||||
public string ImdbId { get; set; }
|
||||
public string AnidbId { get; set; }
|
||||
public int RageId { get; set; }
|
||||
public long RageId { get; set; }
|
||||
public int Comments { get; set; }
|
||||
public int Downloads { get; set; }
|
||||
public NzbxVotesModel Votes { get; set; }
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace NzbDrone.Core.Model.Nzbx
|
|||
public int Completion { get; set; }
|
||||
public int CategoryId { get; set; }
|
||||
public string ImdbId { get; set; }
|
||||
public int RageId { get; set; }
|
||||
public long RageId { get; set; }
|
||||
public int Comments { get; set; }
|
||||
public int Downloads { get; set; }
|
||||
public NzbxVotesModel Votes { get; set; }
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
</Reference>
|
||||
<Reference Include="DataTables.Mvc.Core, Version=0.1.0.85, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\DataTables.Mvc.Core.0.1.0.85\lib\DataTables.Mvc.Core.dll</HintPath>
|
||||
<HintPath>..\Libraries\DataTables.Mvc.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DeskMetrics.NET">
|
||||
<HintPath>..\Libraries\DeskMetrics\DeskMetrics.NET.dll</HintPath>
|
||||
|
@ -226,6 +226,7 @@
|
|||
<Compile Include="Datastore\MigrationLogger.cs" />
|
||||
<Compile Include="Datastore\MigrationsHelper.cs" />
|
||||
<Compile Include="Datastore\CustomeMapper.cs" />
|
||||
<Compile Include="Datastore\Migrations\Migration20121227.cs" />
|
||||
<Compile Include="Datastore\Migrations\Migration20121226.cs" />
|
||||
<Compile Include="Datastore\Migrations\Migration20121218.cs" />
|
||||
<Compile Include="Datastore\Migrations\Migration20121209.cs" />
|
||||
|
|
|
@ -294,7 +294,7 @@ namespace NzbDrone.Core
|
|||
result.Quality = QualityTypes.Bluray720p;
|
||||
return result;
|
||||
}
|
||||
if (normalizedName.Contains("webdl"))
|
||||
if (normalizedName.Contains("webdl") || normalizedName.Contains("webrip"))
|
||||
{
|
||||
if (normalizedName.Contains("1080p"))
|
||||
{
|
||||
|
|
|
@ -143,9 +143,9 @@ namespace NzbDrone.Core.Providers
|
|||
}
|
||||
|
||||
//Make sure this file is an upgrade for ALL episodes already on disk
|
||||
if (episodes.All(e => e.EpisodeFile == null || e.EpisodeFile.QualityWrapper <= parseResult.Quality))
|
||||
if (episodes.All(e => e.EpisodeFile == null || e.EpisodeFile.QualityWrapper < parseResult.Quality))
|
||||
{
|
||||
Logger.Debug("Deleting the existing file(s) on disk to upgrade to: {0}", filePath);
|
||||
Logger.Info("Deleting the existing file(s) on disk to upgrade to: {0}", filePath);
|
||||
//Do the delete for files where there is already an episode on disk
|
||||
episodes.Where(e => e.EpisodeFile != null).Select(e => e.EpisodeFile.Path).Distinct().ToList().ForEach(p => _recycleBinProvider.DeleteFile(p));
|
||||
}
|
||||
|
|
|
@ -87,8 +87,8 @@ namespace NzbDrone.Core.Providers
|
|||
|
||||
if (!_diskProvider.FolderExists(series.Path))
|
||||
{
|
||||
Logger.Warn("Series Folder doesn't exist: {0}", series.Path);
|
||||
return;
|
||||
Logger.Warn("Series Folder doesn't exist: {0}, creating it.", series.Path);
|
||||
_diskProvider.CreateDirectory(series.Path);
|
||||
}
|
||||
|
||||
var size = _diskProvider.GetDirectorySize(subfolderInfo.FullName);
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace NzbDrone.Core.Providers
|
|||
|
||||
if (String.IsNullOrWhiteSpace(recyclingBin))
|
||||
{
|
||||
logger.Info("Recycling Bin has not been configured, deleting permanently.");
|
||||
logger.Info("Recycling Bin has not been configured, deleting permanently. {0}", path);
|
||||
_diskProvider.DeleteFolder(path, true);
|
||||
logger.Trace("Folder has been permanently deleted: {0}", path);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ namespace NzbDrone.Core.Providers
|
|||
|
||||
if (String.IsNullOrWhiteSpace(recyclingBin))
|
||||
{
|
||||
logger.Info("Recycling Bin has not been configured, deleting permanently.");
|
||||
logger.Info("Recycling Bin has not been configured, deleting permanently. {0}", path);
|
||||
_diskProvider.DeleteFile(path);
|
||||
logger.Trace("File has been permanently deleted: {0}", path);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace NzbDrone.Core.Providers
|
|||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private static readonly Regex parseRegex = new Regex(@"(?:\>)(?<filename>NzbDrone.+?(?<version>\d+\.\d+\.\d+\.\d+).+?)(?:\<\/A\>)", RegexOptions.IgnoreCase);
|
||||
public const string DEFAULT_UPDATE_URL = @"http://update.nzbdrone.com/_release/";
|
||||
public const string DEFAULT_UPDATE_URL = @"http://update.nzbdrone.com/v1/";
|
||||
|
||||
|
||||
public UpdateProvider(HttpProvider httpProvider, ConfigProvider configProvider,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Autofac" version="2.6.3.862" targetFramework="net40" />
|
||||
<package id="DataTables.Mvc.Core" version="0.1.0.85" />
|
||||
<package id="DotNetZip" version="1.9.1.8" />
|
||||
<package id="Growl" version="0.6" />
|
||||
<package id="MediaInfoNet" version="0.3" targetFramework="net40" />
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.8.0" newVersion="4.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
|
|
|
@ -47,8 +47,6 @@ namespace NzbDrone.Test.Common
|
|||
{
|
||||
MockedRestProvider = new Mock<RestProvider>();
|
||||
ReportingService.RestProvider = MockedRestProvider.Object;
|
||||
ReportingService.SetupExceptronDriver();
|
||||
|
||||
|
||||
if (Directory.Exists(TempFolder))
|
||||
{
|
||||
|
|
|
@ -62,9 +62,6 @@ namespace NzbDrone.Update
|
|||
private static void InitLoggers()
|
||||
{
|
||||
ReportingService.RestProvider = _container.Resolve<RestProvider>();
|
||||
ReportingService.SetupExceptronDriver();
|
||||
|
||||
LogConfiguration.RegisterRemote();
|
||||
|
||||
LogConfiguration.RegisterConsoleLogger(LogLevel.Trace);
|
||||
LogConfiguration.RegisterUdpLogger();
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace NzbDrone.Web.App_Start
|
|||
{
|
||||
public static void Start()
|
||||
{
|
||||
if (!ModelBinders.Binders.ContainsKey(typeof(DataTablesPageRequest)))
|
||||
if(!ModelBinders.Binders.ContainsKey(typeof(DataTablesPageRequest)))
|
||||
ModelBinders.Binders.Add(typeof(DataTablesPageRequest), new DataTablesModelBinder());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ namespace NzbDrone.Web.App_Start
|
|||
LogManager.Configuration = new XmlLoggingConfiguration(environmentProvider.GetNlogConfigPath(), false);
|
||||
|
||||
LogConfiguration.RegisterUdpLogger();
|
||||
LogConfiguration.RegisterRemote();
|
||||
LogConfiguration.RegisterConsoleLogger(LogLevel.Info, "NzbDrone.Web.MvcApplication");
|
||||
LogConfiguration.RegisterConsoleLogger(LogLevel.Info, "NzbDrone.Core.CentralDispatch");
|
||||
LogConfiguration.RegisterRollingFileLogger(environmentProvider.GetLogFileName(), LogLevel.Trace);
|
||||
|
|
|
@ -322,3 +322,15 @@ i[class*="icon-"]:not(.gridAction):hover {
|
|||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
#upgrade-now {
|
||||
background-color: #FCF8E3;
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
|
||||
}
|
||||
|
||||
#upgrade-now h3 {
|
||||
color: #c09853;
|
||||
font-weight: bold;
|
||||
}
|
|
@ -64,7 +64,7 @@
|
|||
</Reference>
|
||||
<Reference Include="DataTables.Mvc.Core, Version=0.1.0.85, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\DataTables.Mvc.Core.0.1.0.85\lib\DataTables.Mvc.Core.dll</HintPath>
|
||||
<HintPath>..\Libraries\DataTables.Mvc.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dynamic">
|
||||
<HintPath>..\packages\DynamicQuery.1.0\lib\35\Dynamic.dll</HintPath>
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
}
|
||||
</style>
|
||||
<div id="stylized">
|
||||
<div class="warningBox">
|
||||
Do not set Download Client TV Directory to the same location as your TV shows, it can have undesired effects.
|
||||
</div>
|
||||
@using (Html.BeginForm("SaveDownloadClient", "Settings", FormMethod.Post, new { id = "DownloadClientForm", name = "DownloadClientForm", @class = "settingsForm" }))
|
||||
{
|
||||
<div id="downloadClient-top" class="settingsForm">
|
||||
|
|
|
@ -40,6 +40,13 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="upgrade-now">
|
||||
<h3>
|
||||
You are running an old version of NzbDrone. Please upgrade to latest version and enjoy a brand new UI and tons of new features and enhancements
|
||||
<a href="http://www.nzbdrone.com" target="_blank">www.nzbdrone.com</a>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div id="logo">
|
||||
<span>@ViewBag.Title</span>
|
||||
</div>
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.8.0" newVersion="4.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<package id="Autofac" version="2.6.3.862" targetFramework="net40" />
|
||||
<package id="Autofac.Mvc3" version="2.6.3.862" targetFramework="net40" />
|
||||
<package id="Backbone.js" version="0.9.2" targetFramework="net40" />
|
||||
<package id="DataTables.Mvc" version="0.1.0.85" />
|
||||
<package id="DataTables.Mvc.Core" version="0.1.0.85" />
|
||||
<package id="DynamicQuery" version="1.0" />
|
||||
<package id="FontAwesome" version="2.0.2" targetFramework="net40" />
|
||||
<package id="jQuery" version="1.8.2" targetFramework="net40" />
|
||||
|
|
|
@ -48,12 +48,10 @@ namespace NzbDrone
|
|||
var environmentProvider = _container.Resolve<EnvironmentProvider>();
|
||||
|
||||
ReportingService.RestProvider = _container.Resolve<RestProvider>();
|
||||
ReportingService.SetupExceptronDriver();
|
||||
|
||||
LogConfiguration.RegisterRollingFileLogger(environmentProvider.GetLogFileName(), LogLevel.Info);
|
||||
LogConfiguration.RegisterConsoleLogger(LogLevel.Debug);
|
||||
LogConfiguration.RegisterUdpLogger();
|
||||
LogConfiguration.RegisterRemote();
|
||||
LogConfiguration.Reload();
|
||||
Logger.Info("Start-up Path:'{0}'", environmentProvider.ApplicationPath);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ Param(
|
|||
|
||||
if ($branch -eq "<default>")
|
||||
{
|
||||
$branch = "teamcity";
|
||||
$branch = "master";
|
||||
}
|
||||
|
||||
Write-Host $branch;
|
||||
|
|
Loading…
Reference in New Issue