1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-18 21:35:51 -04:00

Compare commits

..

26 Commits

Author SHA1 Message Date
Leonardo Galli
0b278c7db8 Searching for movie now works with downloading. They also get imported fine.
Additionally, a whole series (or movie in this case) can now be
downloaded manually.
Note: It probably won't start downloading missed releases. Only manually
clicking search for is working ATM.
2016-12-28 17:13:18 +01:00
Leonardo Galli
0b765d10fe Updated some text to say movies instead of series 2016-12-27 18:48:59 +01:00
Leonardo Galli
20dbdfb344 Added first iteration of adding movies.
Currently working:
- Searching for new Movies on IMDb (very hacky)
- Adding movie as a series with one season and episode (very hacky)
- Rarbg.to indexer. (somewhat hacky)

TODO:
- Tweak release specifications so that they do not cause exceptions.
- Add Movie struct so that searching for ones is not so hacky.
- rework movies UI.
2016-12-27 18:31:38 +01:00
Leonardo Galli
426448ed98 Update readme.md 2016-12-25 12:43:05 +01:00
Keivan
03b83ed226 Rename Metadata Dir to fix build in *nix 2016-12-24 12:13:16 -08:00
Keivan
eafe79450e Rename Metadata Dir Step 1 2016-12-24 12:13:15 -08:00
Keivan
f286dba40a Rename QBittorent Dir to fix building in *nix 2016-12-24 12:13:14 -08:00
Keivan
448f579723 Rename QBittorent Dir Step 1 2016-12-24 12:13:13 -08:00
Keivan Beigi
1562081235 Upgraded MediaInfo from 0.7.74 to 0.7.91 2016-12-23 13:51:01 -08:00
Keivan Beigi
0214c8e0f0 Removed unused using statements 2016-12-23 13:45:24 -08:00
Keivan Beigi
f16dd069b5 Upgraded DDay.iCal to Ical.Net 2016-12-21 20:38:37 -08:00
Keivan Beigi
aba613acd1 Because it's 2016! 2016-12-21 20:38:37 -08:00
Keivan Beigi
2e36538dcd Environment variables sometimes lie! 2016-12-21 20:38:35 -08:00
Keivan Beigi
c42e4d682c more kosher regex group names. 2016-12-21 20:38:35 -08:00
Keivan Beigi
327536b684 Added NoOp Performance Counter Manager 2016-12-21 20:38:35 -08:00
Mark McDowall
7dbacf105d Fixed: Parsing of some anime releases that use Episode after the title 2016-12-21 18:08:02 -08:00
margaale
8d776abb48 Fixed: Handle download clients sending invalid content-type header.
DownloadStation incorrectly surrounds charset with double-quotes. whereas the http standard specifies they must be without quotes.

fixes #1586
2016-12-20 20:54:44 +01:00
Mark McDowall
7f8093de92 Fixed: Use Category from qBittorrent when set instead of Label 2016-12-13 23:32:46 -08:00
Mark McDowall
c1de7f26d1 Added test for 4 digit season number and series title with year 2016-12-13 23:32:46 -08:00
Mark McDowall
4a82d30d3d Fixed: Parsing of mini episodes that contain the year in the title 2016-12-13 23:32:46 -08:00
Keivan Beigi
da52e60f36 Upgraded Nlog/RestSharp/Selenium 2016-12-12 11:17:15 -08:00
Keivan Beigi
cf58e52f40 Upgraded Nancy!!!! 2016-12-12 11:17:15 -08:00
Keivan Beigi
2a7ae96906 upgraded nbuilder/automoq 2016-12-12 11:17:15 -08:00
Keivan Beigi
053f6fcaeb Upgrade fluentmigrator 2016-12-12 11:17:15 -08:00
Keivan Beigi
0c75d0bb03 Upgraded nunit/fluentassertion 2016-12-12 11:17:15 -08:00
Thijs Tijsma
0c9b5dc97e Added Visual Studio folder (.vs) to the ignore file. 2016-12-11 15:33:48 -08:00
705 changed files with 1419 additions and 3411 deletions

1
.gitignore vendored
View File

@@ -10,6 +10,7 @@ src/**/[Oo]bj/
*.suo *.suo
*.user *.user
*.sln.docstates *.sln.docstates
.vs/
# Build results # Build results
*_i.c *_i.c

View File

@@ -1,7 +1,7 @@
# Sonarr # # Sonarr #
This fork of Sonarr aims to turn it into something like Couchpotato.
Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available. At the moment almost nothing is implemented.
## Major Features Include: ## ## Major Features Include: ##

View File

@@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following

View File

@@ -52,7 +52,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.4\lib\net40\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.3.11\lib\net40\NLog.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />

View File

@@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.3.4" targetFramework="net40" /> <package id="NLog" version="4.3.11" targetFramework="net40" />
</packages> </packages>

View File

@@ -1,9 +1,6 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
using System; using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq.Expressions;
using System.Reflection;
using System.Threading; using System.Threading;
namespace Microsoft.AspNet.SignalR.Infrastructure namespace Microsoft.AspNet.SignalR.Infrastructure

View File

@@ -4,7 +4,7 @@ using System.Diagnostics;
namespace Microsoft.AspNet.SignalR.Infrastructure namespace Microsoft.AspNet.SignalR.Infrastructure
{ {
internal class NoOpPerformanceCounter : IPerformanceCounter public class NoOpPerformanceCounter : IPerformanceCounter
{ {
public string CounterName public string CounterName
{ {

View File

@@ -6,7 +6,6 @@ using System.Diagnostics;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.SignalR.Configuration; using Microsoft.AspNet.SignalR.Configuration;
using Microsoft.AspNet.SignalR.Hosting; using Microsoft.AspNet.SignalR.Hosting;

View File

@@ -1,13 +1,9 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
using System; using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq; using System.Linq;
using System.Reflection;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.SignalR.Infrastructure; using Microsoft.AspNet.SignalR.Infrastructure;

View File

@@ -3,7 +3,6 @@
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.SignalR.Hosting; using Microsoft.AspNet.SignalR.Hosting;
using Microsoft.AspNet.SignalR.Infrastructure; using Microsoft.AspNet.SignalR.Infrastructure;

View File

@@ -7,11 +7,9 @@ using System.Security.Principal;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.SignalR.Owin.Infrastructure; using Microsoft.AspNet.SignalR.Owin.Infrastructure;
using Microsoft.AspNet.SignalR.Hosting;
namespace Microsoft.AspNet.SignalR.Owin namespace Microsoft.AspNet.SignalR.Owin
{ {
using WebSocketFunc = Func<IDictionary<string, object>, Task>;
public partial class ServerRequest : public partial class ServerRequest :
#if NET45 #if NET45
IWebSocketRequest IWebSocketRequest

View File

@@ -38,16 +38,20 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="FluentAssertions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="FizzWare.NBuilder, Version=4.0.0.115, Culture=neutral, PublicKeyToken=5651b03e12e42c12, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.dll</HintPath> <HintPath>..\packages\NBuilder.4.0.0\lib\net40\FizzWare.NBuilder.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="FluentAssertions.Core, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="FluentAssertions, Version=4.18.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath> <HintPath>..\packages\FluentAssertions.4.18.0\lib\net40\FluentAssertions.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL"> <Reference Include="FluentAssertions.Core, Version=4.18.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath> <HintPath>..\packages\FluentAssertions.4.18.0\lib\net40\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.5.0\lib\net40\nunit.framework.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
@@ -57,9 +61,6 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="FizzWare.NBuilder">
<HintPath>..\packages\NBuilder.3.0.1.1\lib\FizzWare.NBuilder.dll</HintPath>
</Reference>
<Reference Include="Moq"> <Reference Include="Moq">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath> <HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference> </Reference>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" /> <package id="FluentAssertions" version="4.18.0" targetFramework="net40" />
<package id="Moq" version="4.0.10827" /> <package id="Moq" version="4.0.10827" />
<package id="NBuilder" version="3.0.1.1" targetFramework="net40" /> <package id="NBuilder" version="4.0.0" targetFramework="net40" />
<package id="NUnit" version="3.2.0" targetFramework="net40" /> <package id="NUnit" version="3.5.0" targetFramework="net40" />
</packages> </packages>

View File

@@ -27,7 +27,7 @@ namespace NzbDrone.Api.Authentication
_configFileProvider = configFileProvider; _configFileProvider = configFileProvider;
} }
public int Order { get { return 10; } } public int Order => 10;
public void Register(IPipelines pipelines) public void Register(IPipelines pipelines)
{ {

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Core.Blacklisting;
using NzbDrone.Core.Blacklisting;
using NzbDrone.Core.Datastore; using NzbDrone.Core.Datastore;
namespace NzbDrone.Api.Blacklist namespace NzbDrone.Api.Blacklist

View File

@@ -2,7 +2,11 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using DDay.iCal; using Ical.Net;
using Ical.Net.DataTypes;
using Ical.Net.Interfaces.Serialization;
using Ical.Net.Serialization;
using Ical.Net.Serialization.iCalendar.Factory;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;
using Nancy.Responses; using Nancy.Responses;
using NzbDrone.Core.Tags; using NzbDrone.Core.Tags;
@@ -22,6 +26,7 @@ namespace NzbDrone.Api.Calendar
_tagService = tagService; _tagService = tagService;
Get["/NzbDrone.ics"] = options => GetCalendarFeed(); Get["/NzbDrone.ics"] = options => GetCalendarFeed();
Get["/Sonarr.ics"] = options => GetCalendarFeed();
} }
private Response GetCalendarFeed() private Response GetCalendarFeed()
@@ -75,7 +80,12 @@ namespace NzbDrone.Api.Calendar
} }
var episodes = _episodeService.EpisodesBetweenDates(start, end, unmonitored); var episodes = _episodeService.EpisodesBetweenDates(start, end, unmonitored);
var icalCalendar = new iCalendar(); var calendar = new Ical.Net.Calendar
{
ProductId = "-//sonarr.tv//Sonarr//EN"
};
foreach (var episode in episodes.OrderBy(v => v.AirDateUtc.Value)) foreach (var episode in episodes.OrderBy(v => v.AirDateUtc.Value))
{ {
@@ -89,28 +99,27 @@ namespace NzbDrone.Api.Calendar
continue; continue;
} }
var occurrence = icalCalendar.Create<Event>(); var occurrence = calendar.Create<Event>();
occurrence.UID = "NzbDrone_episode_" + episode.Id.ToString(); occurrence.Uid = "NzbDrone_episode_" + episode.Id;
occurrence.Status = episode.HasFile ? EventStatus.Confirmed : EventStatus.Tentative; occurrence.Status = episode.HasFile ? EventStatus.Confirmed : EventStatus.Tentative;
occurrence.Start = new iCalDateTime(episode.AirDateUtc.Value) { HasTime = true }; occurrence.Start = new CalDateTime(episode.AirDateUtc.Value) { HasTime = true };
occurrence.End = new iCalDateTime(episode.AirDateUtc.Value.AddMinutes(episode.Series.Runtime)) { HasTime = true }; occurrence.End = new CalDateTime(episode.AirDateUtc.Value.AddMinutes(episode.Series.Runtime)) { HasTime = true };
occurrence.Description = episode.Overview; occurrence.Description = episode.Overview;
occurrence.Categories = new List<string>() { episode.Series.Network }; occurrence.Categories = new List<string>() { episode.Series.Network };
switch (episode.Series.SeriesType) switch (episode.Series.SeriesType)
{ {
case SeriesTypes.Daily: case SeriesTypes.Daily:
occurrence.Summary = string.Format("{0} - {1}", episode.Series.Title, episode.Title); occurrence.Summary = $"{episode.Series.Title} - {episode.Title}";
break; break;
default: default:
occurrence.Summary = string.Format("{0} - {1}x{2:00} - {3}", episode.Series.Title, episode.SeasonNumber, episode.EpisodeNumber, episode.Title); occurrence.Summary =$"{episode.Series.Title} - {episode.SeasonNumber}x{episode.EpisodeNumber:00} - {episode.Title}";
break; break;
} }
} }
var serializer = new DDay.iCal.Serialization.iCalendar.SerializerFactory().Build(icalCalendar.GetType(), new DDay.iCal.Serialization.SerializationContext()) as DDay.iCal.Serialization.IStringSerializer; var serializer = (IStringSerializer) new SerializerFactory().Build(calendar.GetType(), new SerializationContext());
var icalendar = serializer.SerializeToString(icalCalendar); var icalendar = serializer.SerializeToString(calendar);
return new TextResponse(icalendar, "text/calendar"); return new TextResponse(icalendar, "text/calendar");
} }

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
namespace NzbDrone.Api.ClientSchema namespace NzbDrone.Api.ClientSchema
{ {

View File

@@ -1,5 +1,4 @@
using System; using FluentValidation;
using FluentValidation;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
using NzbDrone.Core.Validation.Paths; using NzbDrone.Core.Validation.Paths;

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Config namespace NzbDrone.Api.Config

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
using NzbDrone.Core.Authentication; using NzbDrone.Core.Authentication;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
using NzbDrone.Core.Update; using NzbDrone.Core.Update;

View File

@@ -1,5 +1,4 @@
using System; using FluentValidation;
using FluentValidation;
using NzbDrone.Api.Validation; using NzbDrone.Api.Validation;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Config namespace NzbDrone.Api.Config

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using FluentValidation; using FluentValidation;
using FluentValidation.Results; using FluentValidation.Results;

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
using NzbDrone.Core.Organizer; using NzbDrone.Core.Organizer;
namespace NzbDrone.Api.Config namespace NzbDrone.Api.Config

View File

@@ -1,7 +1,4 @@
using System; using NzbDrone.Core.Configuration;
using System.Linq;
using System.Reflection;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Config namespace NzbDrone.Api.Config
{ {

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Config namespace NzbDrone.Api.Config

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using NzbDrone.Core.DiskSpace; using NzbDrone.Core.DiskSpace;
namespace NzbDrone.Api.DiskSpace namespace NzbDrone.Api.DiskSpace

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Api.REST;
using NzbDrone.Api.REST;
namespace NzbDrone.Api.DiskSpace namespace NzbDrone.Api.DiskSpace
{ {

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Core.Download;
using NzbDrone.Core.Download;
namespace NzbDrone.Api.DownloadClient namespace NzbDrone.Api.DownloadClient
{ {

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Core.Indexers;
using NzbDrone.Core.Indexers;
namespace NzbDrone.Api.DownloadClient namespace NzbDrone.Api.DownloadClient
{ {

View File

@@ -1,6 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using NLog; using NLog;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
using NzbDrone.Core.Datastore.Events; using NzbDrone.Core.Datastore.Events;

View File

@@ -3,6 +3,7 @@ using NzbDrone.Api.REST;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;
using NzbDrone.Core.DecisionEngine; using NzbDrone.Core.DecisionEngine;
using NzbDrone.SignalR; using NzbDrone.SignalR;
using Nancy;
namespace NzbDrone.Api.Episodes namespace NzbDrone.Api.Episodes
{ {

View File

@@ -1,10 +1,6 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NzbDrone.Common.Extensions; using NzbDrone.Common.Extensions;
using NzbDrone.Api.EpisodeFiles; using NzbDrone.Api.EpisodeFiles;
using NzbDrone.Api.Extensions;
using NzbDrone.Api.Series; using NzbDrone.Api.Series;
using NzbDrone.Core.Datastore.Events; using NzbDrone.Core.Datastore.Events;
using NzbDrone.Core.DecisionEngine; using NzbDrone.Core.DecisionEngine;

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;

View File

@@ -14,7 +14,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
_cacheableSpecification = cacheableSpecification; _cacheableSpecification = cacheableSpecification;
} }
public int Order { get { return 0; } } public int Order => 0;
public void Register(IPipelines pipelines) public void Register(IPipelines pipelines)
{ {

View File

@@ -7,7 +7,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
{ {
public class CorsPipeline : IRegisterNancyPipeline public class CorsPipeline : IRegisterNancyPipeline
{ {
public int Order { get { return 0; } } public int Order => 0;
public void Register(IPipelines pipelines) public void Register(IPipelines pipelines)
{ {

View File

@@ -13,7 +13,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
{ {
private readonly Logger _logger; private readonly Logger _logger;
public int Order { get { return 0; } } public int Order => 0;
public GzipCompressionPipeline(Logger logger) public GzipCompressionPipeline(Logger logger)
{ {

View File

@@ -14,7 +14,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
_cacheableSpecification = cacheableSpecification; _cacheableSpecification = cacheableSpecification;
} }
public int Order { get { return 0; } } public int Order => 0;
public void Register(IPipelines pipelines) public void Register(IPipelines pipelines)
{ {

View File

@@ -7,7 +7,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
{ {
public class NzbDroneVersionPipeline : IRegisterNancyPipeline public class NzbDroneVersionPipeline : IRegisterNancyPipeline
{ {
public int Order { get { return 0; } } public int Order => 0;
public void Register(IPipelines pipelines) public void Register(IPipelines pipelines)
{ {

View File

@@ -1,5 +1,4 @@
using System; using System;
using System.Linq;
using System.Threading; using System.Threading;
using Nancy; using Nancy;
using Nancy.Bootstrapper; using Nancy.Bootstrapper;
@@ -23,7 +22,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
_errorPipeline = errorPipeline; _errorPipeline = errorPipeline;
} }
public int Order { get { return 100; } } public int Order => 100;
public void Register(IPipelines pipelines) public void Register(IPipelines pipelines)
{ {

View File

@@ -1,4 +1,3 @@
using System;
using System.IO; using System.IO;
using NLog; using NLog;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;

View File

@@ -1,6 +1,5 @@
using System.IO; using System.IO;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Nancy;
using NLog; using NLog;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.EnvironmentInfo;

View File

@@ -1,5 +1,4 @@
using System; using System.IO;
using System.IO;
using NLog; using NLog;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.EnvironmentInfo;

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
using NzbDrone.Common.Http; using NzbDrone.Common.Http;

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Core.Indexers;
using NzbDrone.Core.Indexers;
namespace NzbDrone.Api.Indexers namespace NzbDrone.Api.Indexers
{ {

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Core.Indexers;
using NzbDrone.Core.Indexers;
namespace NzbDrone.Api.Indexers namespace NzbDrone.Api.Indexers
{ {

View File

@@ -1,8 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using NzbDrone.Core.DecisionEngine; using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Parser.Model;
using System.Linq;
namespace NzbDrone.Api.Indexers namespace NzbDrone.Api.Indexers
{ {

View File

@@ -8,7 +8,6 @@ using System.Linq;
using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Parser.Model;
using NzbDrone.Api.Extensions; using NzbDrone.Api.Extensions;
using NLog; using NLog;
using NzbDrone.Core.Indexers;
namespace NzbDrone.Api.Indexers namespace NzbDrone.Api.Indexers
{ {

View File

@@ -31,13 +31,6 @@ namespace NzbDrone.Api.Logs
return Path.Combine(_appFolderInfo.GetLogFolder(), filename); return Path.Combine(_appFolderInfo.GetLogFolder(), filename);
} }
protected override string DownloadUrlRoot protected override string DownloadUrlRoot => "logfile";
{
get
{
return "logfile";
}
}
} }
} }

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;

View File

@@ -1,5 +1,4 @@
using NzbDrone.Core.Datastore; using NzbDrone.Core.Instrumentation;
using NzbDrone.Core.Instrumentation;
namespace NzbDrone.Api.Logs namespace NzbDrone.Api.Logs
{ {

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
@@ -38,12 +37,6 @@ namespace NzbDrone.Api.Logs
return Path.Combine(_appFolderInfo.GetUpdateLogFolder(), filename); return Path.Combine(_appFolderInfo.GetUpdateLogFolder(), filename);
} }
protected override string DownloadUrlRoot protected override string DownloadUrlRoot => "updatelogfile";
{
get
{
return "updatelogfile";
}
}
} }
} }

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Core.Extras.Metadata;
using NzbDrone.Core.Extras.Metadata;
namespace NzbDrone.Api.Metadata namespace NzbDrone.Api.Metadata
{ {

View File

@@ -1,6 +1,4 @@
using System; namespace NzbDrone.Api.Metadata
namespace NzbDrone.Api.Metadata
{ {
public class MetadataResource : ProviderResource public class MetadataResource : ProviderResource
{ {

View File

@@ -1,10 +1,7 @@
using System; using System.Linq;
using System.Linq;
using Nancy;
using Nancy.Bootstrapper; using Nancy.Bootstrapper;
using Nancy.Diagnostics; using Nancy.Diagnostics;
using NLog; using NLog;
using NzbDrone.Api.ErrorManagement;
using NzbDrone.Api.Extensions.Pipelines; using NzbDrone.Api.Extensions.Pipelines;
using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Instrumentation; using NzbDrone.Common.Instrumentation;
@@ -55,17 +52,8 @@ namespace NzbDrone.Api
return _tinyIoCContainer; return _tinyIoCContainer;
} }
protected override DiagnosticsConfiguration DiagnosticsConfiguration protected override DiagnosticsConfiguration DiagnosticsConfiguration => new DiagnosticsConfiguration { Password = @"password" };
{
get { return new DiagnosticsConfiguration { Password = @"password" }; }
}
protected override byte[] FavIcon protected override byte[] FavIcon => null;
{
get
{
return null;
}
}
} }
} }

View File

@@ -1,5 +1,4 @@
using System; using NzbDrone.Core.Notifications;
using NzbDrone.Core.Notifications;
namespace NzbDrone.Api.Notifications namespace NzbDrone.Api.Notifications
{ {

View File

@@ -40,36 +40,50 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Ical.Net.2.2.25\lib\net40\antlr.runtime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentValidation, Version=6.2.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="FluentValidation, Version=6.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll</HintPath> <HintPath>..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Nancy, Version=0.23.2.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Ical.Net, Version=2.1.0.30332, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\Ical.Net.2.2.25\lib\net40\Ical.Net.dll</HintPath>
<HintPath>..\packages\Nancy.0.23.2\lib\net40\Nancy.dll</HintPath> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Nancy.Authentication.Basic, Version=0.23.2.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Ical.Net.Collections, Version=2.1.0.30331, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\Ical.Net.2.2.25\lib\net40\Ical.Net.Collections.dll</HintPath>
<HintPath>..\packages\Nancy.Authentication.Basic.0.23.2\lib\net40\Nancy.Authentication.Basic.dll</HintPath> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Nancy.Authentication.Forms"> <Reference Include="Nancy, Version=1.4.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Nancy.Authentication.Forms.0.23.2\lib\net40\Nancy.Authentication.Forms.dll</HintPath> <HintPath>..\packages\Nancy.1.4.3\lib\net40\Nancy.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Nancy.Authentication.Basic, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Nancy.Authentication.Basic.1.4.1\lib\net40\Nancy.Authentication.Basic.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Nancy.Authentication.Forms, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Nancy.Authentication.Forms.1.4.1\lib\net40\Nancy.Authentication.Forms.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.4\lib\net40\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.3.11\lib\net40\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NodaTime, Version=1.3.0.0, Culture=neutral, PublicKeyToken=4226afe0d9b296d1, processorArchitecture=MSIL">
<HintPath>..\packages\Ical.Net.2.2.25\lib\net40\NodaTime.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="DDay.iCal">
<HintPath>..\packages\DDay.iCal.1.0.2.575\lib\DDay.iCal.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\Libraries\Sqlite\System.Data.SQLite.dll</HintPath> <HintPath>..\Libraries\Sqlite\System.Data.SQLite.dll</HintPath>

View File

@@ -1,6 +1,4 @@
using System; using System;
using System.Linq;
using System.Collections.Generic;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
using NzbDrone.Api.Validation; using NzbDrone.Api.Validation;
using NzbDrone.Core.Datastore; using NzbDrone.Core.Datastore;

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using NzbDrone.Api.Episodes; using NzbDrone.Api.Episodes;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
using NzbDrone.Api.Series; using NzbDrone.Api.Series;

View File

@@ -1,5 +1,4 @@
using System; using Newtonsoft.Json;
using Newtonsoft.Json;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
namespace NzbDrone.Api.Profiles.Languages namespace NzbDrone.Api.Profiles.Languages
@@ -9,6 +8,6 @@ namespace NzbDrone.Api.Profiles.Languages
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)]
public new int Id { get; set; } public new int Id { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string NameLower { get { return Name.ToLowerInvariant(); } } public string NameLower => Name.ToLowerInvariant();
} }
} }

View File

@@ -1,5 +1,4 @@
using System; using System.Text;
using System.Text;
using Nancy; using Nancy;
namespace NzbDrone.Api.Profiles namespace NzbDrone.Api.Profiles

View File

@@ -1,7 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using FluentValidation; using FluentValidation;
using NzbDrone.Core.Profiles; using NzbDrone.Core.Profiles;
using NzbDrone.Core.Qualities;
using NzbDrone.Core.Validation; using NzbDrone.Core.Validation;
namespace NzbDrone.Api.Profiles namespace NzbDrone.Api.Profiles

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
using NzbDrone.Core.Parser; using NzbDrone.Core.Parser;

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using FluentValidation; using FluentValidation;
using FluentValidation.Results; using FluentValidation.Results;

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
using NzbDrone.Core.Qualities; using NzbDrone.Core.Qualities;

View File

@@ -8,12 +8,6 @@ namespace NzbDrone.Api.REST
public int Id { get; set; } public int Id { get; set; }
[JsonIgnore] [JsonIgnore]
public virtual string ResourceName public virtual string ResourceName => GetType().Name.ToLowerInvariant().Replace("resource", "");
{
get
{
return GetType().Name.ToLowerInvariant().Replace("resource", "");
}
}
} }
} }

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
using NzbDrone.Core.RemotePathMappings; using NzbDrone.Core.RemotePathMappings;

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using FluentValidation.Results; using FluentValidation.Results;
using NzbDrone.Common.Extensions; using NzbDrone.Common.Extensions;
using NzbDrone.Core.Restrictions; using NzbDrone.Core.Restrictions;

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
using NzbDrone.Core.Restrictions; using NzbDrone.Core.Restrictions;

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
using NzbDrone.Core.RootFolders; using NzbDrone.Core.RootFolders;

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic; using Nancy;
using Nancy;
using NzbDrone.Api.Extensions; using NzbDrone.Api.Extensions;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;

View File

@@ -1,6 +1,4 @@
using System; namespace NzbDrone.Api.Series
namespace NzbDrone.Api.Series
{ {
public class AlternateTitleResource public class AlternateTitleResource
{ {

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using NzbDrone.Core.Datastore.Events; using NzbDrone.Core.Datastore.Events;
using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Tags; using NzbDrone.Core.Tags;

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
using NzbDrone.Core.Tags; using NzbDrone.Core.Tags;

View File

@@ -1,34 +1,37 @@
using System; using TinyIoC;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using Nancy; using Nancy;
using Nancy.Bootstrapper;
using Nancy.Diagnostics; using Nancy.Diagnostics;
using TinyIoC; using Nancy.Bootstrapper;
namespace NzbDrone.Api namespace NzbDrone.Api
{ {
/// <summary>
/// TinyIoC bootstrapper - registers default route resolver and registers itself as
/// INancyModuleCatalog for resolving modules but behaviour can be overridden if required.
/// </summary>
public class TinyIoCNancyBootstrapper : NancyBootstrapperWithRequestContainerBase<TinyIoCContainer> public class TinyIoCNancyBootstrapper : NancyBootstrapperWithRequestContainerBase<TinyIoCContainer>
{ {
// <summary> /// <summary>
/// Default assemblies that are ignored for autoregister /// Default assemblies that are ignored for autoregister
/// </summary> /// </summary>
private static readonly IEnumerable<Func<Assembly, bool>> DefaultAutoRegisterIgnoredAssemblies = new Func<Assembly, bool>[] public static IEnumerable<Func<Assembly, bool>> DefaultAutoRegisterIgnoredAssemblies = new Func<Assembly, bool>[]
{ {
asm => !asm.FullName.StartsWith("Nancy.", StringComparison.InvariantCulture), asm => !asm.FullName.StartsWith("Nancy.", StringComparison.InvariantCulture),
}; };
/// <summary> /// <summary>
/// Gets the assemblies to ignore when autoregistering the application container /// Gets the assemblies to ignore when autoregistering the application container
/// Return true from the delegate to ignore that particular assembly, returning true /// Return true from the delegate to ignore that particular assembly, returning false
/// does not mean the assembly *will* be included, a false from another delegate will /// does not mean the assembly *will* be included, a true from another delegate will
/// take precedence. /// take precedence.
/// </summary> /// </summary>
protected virtual IEnumerable<Func<Assembly, bool>> AutoRegisterIgnoredAssemblies protected virtual IEnumerable<Func<Assembly, bool>> AutoRegisterIgnoredAssemblies => DefaultAutoRegisterIgnoredAssemblies;
{
get { return DefaultAutoRegisterIgnoredAssemblies; }
}
/// <summary> /// <summary>
/// Configures the container using AutoRegister followed by registration /// Configures the container using AutoRegister followed by registration
@@ -49,11 +52,6 @@ namespace NzbDrone.Api
return this.ApplicationContainer.Resolve<INancyEngine>(); return this.ApplicationContainer.Resolve<INancyEngine>();
} }
/* protected override IModuleKeyGenerator GetModuleKeyGenerator()
{
return ApplicationContainer.Resolve<IModuleKeyGenerator>();
}*/
/// <summary> /// <summary>
/// Create a default, unconfigured, container /// Create a default, unconfigured, container
/// </summary> /// </summary>
@@ -93,6 +91,7 @@ namespace NzbDrone.Api
break; break;
case Lifetime.PerRequest: case Lifetime.PerRequest:
throw new InvalidOperationException("Unable to directly register a per request lifetime."); throw new InvalidOperationException("Unable to directly register a per request lifetime.");
break;
default: default:
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();
} }
@@ -104,10 +103,10 @@ namespace NzbDrone.Api
/// by IEnumerable{Type} constructor dependencies. /// by IEnumerable{Type} constructor dependencies.
/// </summary> /// </summary>
/// <param name="container">Container to register into</param> /// <param name="container">Container to register into</param>
/// <param name="collectionTypeRegistrationsn">Collection type registrations to register</param> /// <param name="collectionTypeRegistrations">Collection type registrations to register</param>
protected override sealed void RegisterCollectionTypes(TinyIoCContainer container, IEnumerable<CollectionTypeRegistration> collectionTypeRegistrationsn) protected override sealed void RegisterCollectionTypes(TinyIoCContainer container, IEnumerable<CollectionTypeRegistration> collectionTypeRegistrations)
{ {
foreach (var collectionTypeRegistration in collectionTypeRegistrationsn) foreach (var collectionTypeRegistration in collectionTypeRegistrations)
{ {
switch (collectionTypeRegistration.Lifetime) switch (collectionTypeRegistration.Lifetime)
{ {
@@ -119,6 +118,7 @@ namespace NzbDrone.Api
break; break;
case Lifetime.PerRequest: case Lifetime.PerRequest:
throw new InvalidOperationException("Unable to directly register a per request lifetime."); throw new InvalidOperationException("Unable to directly register a per request lifetime.");
break;
default: default:
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();
} }
@@ -160,8 +160,9 @@ namespace NzbDrone.Api
/// <summary> /// <summary>
/// Creates a per request child/nested container /// Creates a per request child/nested container
/// </summary> /// </summary>
/// <param name="context">Current context</param>
/// <returns>Request container instance</returns> /// <returns>Request container instance</returns>
protected override sealed TinyIoCContainer CreateRequestContainer() protected override TinyIoCContainer CreateRequestContainer(NancyContext context)
{ {
return this.ApplicationContainer.GetChildContainer(); return this.ApplicationContainer.GetChildContainer();
} }
@@ -216,7 +217,7 @@ namespace NzbDrone.Api
} }
/// <summary> /// <summary>
/// Retreive a specific module instance from the container /// Retrieve a specific module instance from the container
/// </summary> /// </summary>
/// <param name="container">Container to use</param> /// <param name="container">Container to use</param>
/// <param name="moduleType">Type of the module</param> /// <param name="moduleType">Type of the module</param>
@@ -239,4 +240,4 @@ namespace NzbDrone.Api
container.AutoRegister(AppDomain.CurrentDomain.GetAssemblies().Where(a => !ignoredAssemblies.Any(ia => ia(a))), DuplicateImplementationActions.RegisterMultiple, t => t.Assembly != assembly); container.AutoRegister(AppDomain.CurrentDomain.GetAssemblies().Where(a => !ignoredAssemblies.Any(ia => ia(a))), DuplicateImplementationActions.RegisterMultiple, t => t.Assembly != assembly);
} }
} }
} }

View File

@@ -1,5 +1,4 @@
using System; using System.Text;
using System.Text;
using Nancy; using Nancy;
namespace NzbDrone.Api.Wanted namespace NzbDrone.Api.Wanted

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="DDay.iCal" version="1.0.2.575" targetFramework="net40" />
<package id="FluentValidation" version="6.2.1.0" targetFramework="net40" /> <package id="FluentValidation" version="6.2.1.0" targetFramework="net40" />
<package id="Nancy" version="0.23.2" targetFramework="net40" /> <package id="Ical.Net" version="2.2.25" targetFramework="net40" />
<package id="Nancy.Authentication.Basic" version="0.23.2" targetFramework="net40" /> <package id="Nancy" version="1.4.3" targetFramework="net40" />
<package id="Nancy.Authentication.Forms" version="0.23.2" targetFramework="net40" /> <package id="Nancy.Authentication.Basic" version="1.4.1" targetFramework="net40" />
<package id="Nancy.Authentication.Forms" version="1.4.1" targetFramework="net40" />
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" /> <package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
<package id="NLog" version="4.3.4" targetFramework="net40" /> <package id="NLog" version="4.3.11" targetFramework="net40" />
</packages> </packages>

View File

@@ -37,20 +37,24 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="FluentAssertions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="FizzWare.NBuilder, Version=4.0.0.115, Culture=neutral, PublicKeyToken=5651b03e12e42c12, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.dll</HintPath> <HintPath>..\packages\NBuilder.4.0.0\lib\net40\FizzWare.NBuilder.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="FluentAssertions.Core, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="FluentAssertions, Version=4.18.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath> <HintPath>..\packages\FluentAssertions.4.18.0\lib\net40\FluentAssertions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentAssertions.Core, Version=4.18.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.18.0\lib\net40\FluentAssertions.Core.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.4\lib\net40\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.3.11\lib\net40\NLog.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath> <HintPath>..\packages\NUnit.3.5.0\lib\net40\nunit.framework.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
@@ -58,9 +62,6 @@
<Reference Include="System.ServiceProcess" /> <Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="FizzWare.NBuilder, Version=3.0.1.0, Culture=neutral, PublicKeyToken=5651b03e12e42c12">
<HintPath>..\packages\NBuilder.3.0.1.1\lib\FizzWare.NBuilder.dll</HintPath>
</Reference>
<Reference Include="Moq"> <Reference Include="Moq">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath> <HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference> </Reference>

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;
using NzbDrone.Common.Model; using NzbDrone.Common.Model;

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" /> <package id="FluentAssertions" version="4.18.0" targetFramework="net40" />
<package id="Moq" version="4.0.10827" /> <package id="Moq" version="4.0.10827" />
<package id="NBuilder" version="3.0.1.1" /> <package id="NBuilder" version="4.0.0" targetFramework="net40" />
<package id="NLog" version="4.3.4" targetFramework="net40" /> <package id="NLog" version="4.3.11" targetFramework="net40" />
<package id="NUnit" version="3.2.0" targetFramework="net40" /> <package id="NUnit" version="3.5.0" targetFramework="net40" />
</packages> </packages>

View File

@@ -28,7 +28,7 @@ namespace NzbDrone.Automation.Test
LogManager.Configuration = new LoggingConfiguration(); LogManager.Configuration = new LoggingConfiguration();
var consoleTarget = new ConsoleTarget { Layout = "${level}: ${message} ${exception}" }; var consoleTarget = new ConsoleTarget { Layout = "${level}: ${message} ${exception}" };
LogManager.Configuration.AddTarget(consoleTarget.GetType().Name, consoleTarget); LogManager.Configuration.AddTarget(consoleTarget.GetType().Name, consoleTarget);
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, consoleTarget)); LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", NLog.LogLevel.Trace, consoleTarget));
} }
[TestFixtureSetUp] [TestFixtureSetUp]

View File

@@ -38,20 +38,20 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="FluentAssertions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="FluentAssertions, Version=4.18.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.dll</HintPath> <HintPath>..\packages\FluentAssertions.4.18.0\lib\net40\FluentAssertions.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="FluentAssertions.Core, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="FluentAssertions.Core, Version=4.18.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath> <HintPath>..\packages\FluentAssertions.4.18.0\lib\net40\FluentAssertions.Core.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.4\lib\net40\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.3.11\lib\net40\NLog.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath> <HintPath>..\packages\NUnit.3.5.0\lib\net40\nunit.framework.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
@@ -62,13 +62,13 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="WebDriver, Version=2.48.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="WebDriver, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\Selenium.WebDriver.3.0.1\lib\net40\WebDriver.dll</HintPath>
<HintPath>..\packages\Selenium.WebDriver.2.48.0\lib\net40\WebDriver.dll</HintPath> <Private>True</Private>
</Reference> </Reference>
<Reference Include="WebDriver.Support, Version=2.48.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="WebDriver.Support, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\Selenium.Support.3.0.1\lib\net40\WebDriver.Support.dll</HintPath>
<HintPath>..\packages\Selenium.Support.2.48.0\lib\net40\WebDriver.Support.dll</HintPath> <Private>True</Private>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -47,52 +47,16 @@ namespace NzbDrone.Automation.Test.PageModel
}); });
} }
public IWebElement SeriesNavIcon public IWebElement SeriesNavIcon => FindByClass("x-series-nav");
{
get
{
return FindByClass("x-series-nav");
}
}
public IWebElement CalendarNavIcon public IWebElement CalendarNavIcon => FindByClass("x-calendar-nav");
{
get
{
return FindByClass("x-calendar-nav");
}
}
public IWebElement ActivityNavIcon public IWebElement ActivityNavIcon => FindByClass("x-activity-nav");
{
get
{
return FindByClass("x-activity-nav");
}
}
public IWebElement WantedNavIcon public IWebElement WantedNavIcon => FindByClass("x-wanted-nav");
{
get
{
return FindByClass("x-wanted-nav");
}
}
public IWebElement SettingNavIcon public IWebElement SettingNavIcon => FindByClass("x-settings-nav");
{
get
{
return FindByClass("x-settings-nav");
}
}
public IWebElement SystemNavIcon public IWebElement SystemNavIcon => FindByClass("x-system-nav");
{
get
{
return FindByClass("x-system-nav");
}
}
} }
} }

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" /> <package id="FluentAssertions" version="4.18.0" targetFramework="net40" />
<package id="NLog" version="4.3.4" targetFramework="net40" /> <package id="NLog" version="4.3.11" targetFramework="net40" />
<package id="NUnit" version="3.2.0" targetFramework="net40" /> <package id="NUnit" version="3.5.0" targetFramework="net40" />
<package id="Selenium.Support" version="2.48.0" targetFramework="net40" /> <package id="Selenium.Support" version="3.0.1" targetFramework="net40" />
<package id="Selenium.WebDriver" version="2.48.0" targetFramework="net40" /> <package id="Selenium.WebDriver" version="3.0.1" targetFramework="net40" />
</packages> </packages>

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using FluentAssertions; using FluentAssertions;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using FluentAssertions; using FluentAssertions;

View File

@@ -1,6 +1,5 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq;
using FluentAssertions; using FluentAssertions;
using NUnit.Framework; using NUnit.Framework;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;

View File

@@ -1,8 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;

View File

@@ -0,0 +1,40 @@
using NUnit.Framework;
using FluentAssertions;
using NzbDrone.Test.Common;
using System;
using System.Text;
using NzbDrone.Common.Http;
using System.Collections.Specialized;
namespace NzbDrone.Common.Test.Http
{
[TestFixture]
public class HttpHeaderFixture : TestBase
{
[TestCase("text/html; charset=\"utf-8\"", "utf-8")]
[TestCase("text/html; charset=utf-8", "utf-8")]
public void should_get_encoding_from_content_type_header(string contentType, string charsetExpected)
{
var headers = new NameValueCollection();
headers.Add("Content-Type", contentType);
var httpheader = new HttpHeader(headers);
httpheader.GetEncodingFromContentType().Should().Be(Encoding.GetEncoding(charsetExpected));
}
[TestCase("text/html; charset=asdasd")]
public void should_throw_when_invalid_encoding_is_in_content_type_header(string contentType)
{
var headers = new NameValueCollection();
headers.Add("Content-Type", contentType);
var httpheader = new HttpHeader(headers);
Action action = () => httpheader.GetEncodingFromContentType();
action.ShouldThrow<ArgumentException>();
}
}
}

View File

@@ -1,7 +1,4 @@
using System; using NUnit.Framework;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Common.Http;
namespace NzbDrone.Common.Test.Http namespace NzbDrone.Common.Test.Http
{ {

View File

@@ -1,5 +1,4 @@
using System; using NUnit.Framework;
using NUnit.Framework;
using NzbDrone.Common.Instrumentation; using NzbDrone.Common.Instrumentation;
using FluentAssertions; using FluentAssertions;

View File

@@ -1,5 +1,4 @@
using System; using FluentAssertions;
using FluentAssertions;
using NUnit.Framework; using NUnit.Framework;
using NzbDrone.Common.Extensions; using NzbDrone.Common.Extensions;
using NzbDrone.Test.Common; using NzbDrone.Test.Common;

View File

@@ -37,20 +37,20 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="FluentAssertions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="FluentAssertions, Version=4.18.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.dll</HintPath> <HintPath>..\packages\FluentAssertions.4.18.0\lib\net40\FluentAssertions.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="FluentAssertions.Core, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="FluentAssertions.Core, Version=4.18.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath> <HintPath>..\packages\FluentAssertions.4.18.0\lib\net40\FluentAssertions.Core.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.4\lib\net40\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.3.11\lib\net40\NLog.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath> <HintPath>..\packages\NUnit.3.5.0\lib\net40\nunit.framework.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
@@ -84,6 +84,7 @@
<Compile Include="ExtensionTests\IEnumerableExtensionTests\IntersectByFixture.cs" /> <Compile Include="ExtensionTests\IEnumerableExtensionTests\IntersectByFixture.cs" />
<Compile Include="ExtensionTests\Int64ExtensionFixture.cs" /> <Compile Include="ExtensionTests\Int64ExtensionFixture.cs" />
<Compile Include="Http\HttpClientFixture.cs" /> <Compile Include="Http\HttpClientFixture.cs" />
<Compile Include="Http\HttpHeaderFixture.cs" />
<Compile Include="Http\HttpRequestBuilderFixture.cs" /> <Compile Include="Http\HttpRequestBuilderFixture.cs" />
<Compile Include="Http\HttpRequestFixture.cs" /> <Compile Include="Http\HttpRequestFixture.cs" />
<Compile Include="Http\HttpUriFixture.cs" /> <Compile Include="Http\HttpUriFixture.cs" />

View File

@@ -1,5 +1,4 @@
using System; using NUnit.Framework;
using NUnit.Framework;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;
using NzbDrone.Test.Common; using NzbDrone.Test.Common;
using FluentAssertions; using FluentAssertions;

View File

@@ -196,7 +196,7 @@ namespace NzbDrone.Common.Test
public void get_actual_casing_should_return_actual_casing_for_local_file_in_windows() public void get_actual_casing_should_return_actual_casing_for_local_file_in_windows()
{ {
WindowsOnly(); WindowsOnly();
var path = Environment.ExpandEnvironmentVariables("%SystemRoot%\\System32"); var path = Directory.GetDirectories("C:\\")[3];
path.ToUpper().GetActualCasing().Should().Be(path); path.ToUpper().GetActualCasing().Should().Be(path);
path.ToLower().GetActualCasing().Should().Be(path); path.ToLower().GetActualCasing().Should().Be(path);
} }

View File

@@ -1,9 +1,6 @@
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq;
using System.Text;
using NUnit.Framework; using NUnit.Framework;
using NzbDrone.Common.Cache; using NzbDrone.Common.Cache;
using NzbDrone.Common.TPL; using NzbDrone.Common.TPL;

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" /> <package id="FluentAssertions" version="4.18.0" targetFramework="net40" />
<package id="Moq" version="4.0.10827" /> <package id="Moq" version="4.0.10827" />
<package id="NLog" version="4.3.4" targetFramework="net40" /> <package id="NLog" version="4.3.11" targetFramework="net40" />
<package id="NUnit" version="3.2.0" targetFramework="net40" /> <package id="NUnit" version="3.5.0" targetFramework="net40" />
</packages> </packages>

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