mirror of https://github.com/lidarr/Lidarr
Services: DailySeries added to Nancy
This commit is contained in:
parent
0531029ce7
commit
fa224cc59c
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Web;
|
||||
using Autofac;
|
||||
using MongoDB.Driver;
|
||||
using NzbDrone.Services.Api.Datastore;
|
||||
|
||||
namespace NzbDrone.Services.Api
|
||||
{
|
||||
public static class ApiServicesRegistrationExtention
|
||||
{
|
||||
public static ContainerBuilder RegisterApiServices(this ContainerBuilder containerBuilder)
|
||||
{
|
||||
containerBuilder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly()).SingleInstance();
|
||||
|
||||
containerBuilder.Register(c => c.Resolve<Connection>().GetMainDb())
|
||||
.As<MongoDatabase>().SingleInstance();
|
||||
|
||||
return containerBuilder;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Web;
|
||||
using Autofac;
|
||||
using NLog;
|
||||
using Nancy.Bootstrapper;
|
||||
using Nancy.Bootstrappers.Autofac;
|
||||
using NzbDrone.Services.Api.NancyExtensions;
|
||||
|
||||
namespace NzbDrone.Services.Api
|
||||
{
|
||||
public class Bootstrapper : AutofacNancyBootstrapper
|
||||
{
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
protected override ILifetimeScope GetApplicationContainer()
|
||||
{
|
||||
ApplicationPipelines.OnError.AddItemToEndOfPipeline((context, exception) =>
|
||||
{
|
||||
Logger.FatalException("Application Exception", exception);
|
||||
return null;
|
||||
});
|
||||
|
||||
var builder = new ContainerBuilder();
|
||||
builder.RegisterApiServices();
|
||||
var container = builder.Build();
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
protected override NancyInternalConfiguration InternalConfiguration
|
||||
{
|
||||
get
|
||||
{
|
||||
return NancyInternalConfiguration.WithOverrides(c => c.Serializers.Add(typeof(ServiceStackSerializer)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
|
||||
namespace NzbDrone.Services.Api.DailySeries
|
||||
{
|
||||
public class DailySeriesModel
|
||||
{
|
||||
public const string CollectionName = "DailySeries";
|
||||
|
||||
[BsonId]
|
||||
public Int32 Id { get; set; }
|
||||
|
||||
[BsonElement("t")]
|
||||
public String Title { get; set; }
|
||||
|
||||
[BsonElement("p")]
|
||||
public Boolean Public { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Nancy;
|
||||
using NzbDrone.Services.Api.NancyExtensions;
|
||||
|
||||
namespace NzbDrone.Services.Api.DailySeries
|
||||
{
|
||||
public class DailySeriesModule : NancyModule
|
||||
{
|
||||
private readonly DailySeriesProvider _dailySeriesProvider;
|
||||
|
||||
public DailySeriesModule(DailySeriesProvider dailySeriesProvider)
|
||||
: base("/dailyseries")
|
||||
{
|
||||
_dailySeriesProvider = dailySeriesProvider;
|
||||
|
||||
Get["/"] = x => OnGet();
|
||||
Get["/all"] = x => OnGet();
|
||||
Get["/{Id}"] = x => OnGet((int)x.Id);
|
||||
Get["/isdaily/{Id}"] = x => OnGet((int)x.Id);
|
||||
}
|
||||
|
||||
private Response OnGet()
|
||||
{
|
||||
return _dailySeriesProvider.Public().AsResponse();
|
||||
}
|
||||
|
||||
private Response OnGet(int seriesId)
|
||||
{
|
||||
return _dailySeriesProvider.IsDaily(seriesId).AsResponse();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using MongoDB.Driver;
|
||||
using MongoDB.Driver.Builders;
|
||||
|
||||
namespace NzbDrone.Services.Api.DailySeries
|
||||
{
|
||||
public class DailySeriesProvider
|
||||
{
|
||||
private readonly MongoDatabase _mongoDb;
|
||||
|
||||
public DailySeriesProvider(MongoDatabase mongoDb)
|
||||
{
|
||||
_mongoDb = mongoDb;
|
||||
}
|
||||
|
||||
public DailySeriesProvider()
|
||||
{
|
||||
}
|
||||
|
||||
public List<DailySeriesModel> All()
|
||||
{
|
||||
return _mongoDb.GetCollection<DailySeriesModel>(DailySeriesModel.CollectionName).FindAll().ToList();
|
||||
}
|
||||
|
||||
public List<DailySeriesModel> Public()
|
||||
{
|
||||
var query = Query<DailySeriesModel>.EQ(d => d.Public, true);
|
||||
return _mongoDb.GetCollection<DailySeriesModel>(DailySeriesModel.CollectionName).Find(query).ToList();
|
||||
}
|
||||
|
||||
public Boolean IsDaily(int seriesId)
|
||||
{
|
||||
var query = Query<DailySeriesModel>.EQ(d => d.Id, seriesId);
|
||||
return _mongoDb.GetCollection<DailySeriesModel>(DailySeriesModel.CollectionName).Count(query) > 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace NzbDrone.Services.Api.Datastore
|
||||
{
|
||||
public class Connection
|
||||
{
|
||||
public MongoDatabase GetMainDb()
|
||||
{
|
||||
var db = GetMongoDb("mongodb://nzbdrone:h53huDrAzufRe8a3@ds035147.mongolab.com:35147/?safe=true;wtimeoutMS=2000", "services-dev");
|
||||
return db;
|
||||
}
|
||||
|
||||
public MongoDatabase GetMongoDb(string connectionString, string dbName)
|
||||
{
|
||||
var mongoServer = MongoServer.Create(connectionString);
|
||||
var database = mongoServer.GetDatabase(dbName.ToLowerInvariant());
|
||||
return database;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Nancy;
|
||||
using Nancy.Responses;
|
||||
using ServiceStack.Text;
|
||||
|
||||
namespace NzbDrone.Services.Api.NancyExtensions
|
||||
{
|
||||
public static class JsonExtensions
|
||||
{
|
||||
public static T FromJson<T>(this Stream body)
|
||||
{
|
||||
var reader = new StreamReader(body, true);
|
||||
return JsonSerializer.DeserializeFromReader<T>(reader);
|
||||
}
|
||||
|
||||
public static JsonResponse<TModel> AsResponse<TModel>(this TModel model, HttpStatusCode statusCode = HttpStatusCode.OK)
|
||||
{
|
||||
var jsonResponse = new JsonResponse<TModel>(model, new ServiceStackSerializer()) { StatusCode = statusCode };
|
||||
return jsonResponse;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Nancy;
|
||||
using ServiceStack.Text;
|
||||
|
||||
namespace NzbDrone.Services.Api.NancyExtensions
|
||||
{
|
||||
public class ServiceStackSerializer : ISerializer
|
||||
{
|
||||
public readonly static ServiceStackSerializer Instance = new ServiceStackSerializer();
|
||||
|
||||
public bool CanSerialize(string contentType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Serialize<TModel>(string contentType, TModel model, Stream outputStream)
|
||||
{
|
||||
JsonSerializer.SerializeToStream(model, outputStream);
|
||||
}
|
||||
|
||||
public IEnumerable<string> Extensions { get; private set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,162 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{A675DE45-D30A-4CAC-991A-34DA56947DD7}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Services.Api</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Services.Api</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
<RestorePackages>true</RestorePackages>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Autofac">
|
||||
<HintPath>..\packages\Autofac.2.6.3.862\lib\NET40\Autofac.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Autofac.Configuration">
|
||||
<HintPath>..\packages\Autofac.2.6.3.862\lib\NET40\Autofac.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="MongoDB.Bson">
|
||||
<HintPath>..\packages\mongocsharpdriver.1.7\lib\net35\MongoDB.Bson.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Driver">
|
||||
<HintPath>..\packages\mongocsharpdriver.1.7\lib\net35\MongoDB.Driver.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nancy">
|
||||
<HintPath>..\packages\Nancy.0.15.3\lib\net40\Nancy.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nancy.Bootstrappers.Autofac">
|
||||
<HintPath>..\packages\Nancy.Bootstrappers.Autofac.0.15.3\lib\net40\Nancy.Bootstrappers.Autofac.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nancy.Hosting.Aspnet">
|
||||
<HintPath>..\packages\Nancy.Hosting.Aspnet.0.15.3\lib\net40\Nancy.Hosting.Aspnet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog">
|
||||
<HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ServiceStack.Text">
|
||||
<HintPath>..\packages\ServiceStack.Text.3.9.33\lib\net35\ServiceStack.Text.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ApiServicesRegistrationExtention.cs" />
|
||||
<Compile Include="Bootstrapper.cs" />
|
||||
<Compile Include="DailySeries\DailySeriesModel.cs" />
|
||||
<Compile Include="DailySeries\DailySeriesModule.cs" />
|
||||
<Compile Include="DailySeries\DailySeriesProvider.cs" />
|
||||
<Compile Include="Datastore\Connection.cs" />
|
||||
<Compile Include="NancyExtensions\JsonExtensions.cs" />
|
||||
<Compile Include="NancyExtensions\ServiceStackSerializer.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="packages.config" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
<None Include="Web.Release.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>0</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:14615/</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,35 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Services.Api")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Services.Api")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("616405a2-4ccc-4272-9464-905c69b5a8d3")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<!--
|
||||
In the example below, the "SetAttributes" transform will change the value of
|
||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||
finds an attribute "name" that has a value of "MyDB".
|
||||
|
||||
<connectionStrings>
|
||||
<add name="MyDB"
|
||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
-->
|
||||
<system.web>
|
||||
<!--
|
||||
In the example below, the "Replace" transform will replace the entire
|
||||
<customErrors> section of your web.config file.
|
||||
Note that because there is only one customErrors section under the
|
||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
||||
|
||||
<customErrors defaultRedirect="GenericError.htm"
|
||||
mode="RemoteOnly" xdt:Transform="Replace">
|
||||
<error statusCode="500" redirect="InternalError.htm"/>
|
||||
</customErrors>
|
||||
-->
|
||||
</system.web>
|
||||
</configuration>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<!--
|
||||
In the example below, the "SetAttributes" transform will change the value of
|
||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||
finds an attribute "name" that has a value of "MyDB".
|
||||
|
||||
<connectionStrings>
|
||||
<add name="MyDB"
|
||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
-->
|
||||
<system.web>
|
||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||
<!--
|
||||
In the example below, the "Replace" transform will replace the entire
|
||||
<customErrors> section of your web.config file.
|
||||
Note that because there is only one customErrors section under the
|
||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
||||
|
||||
<customErrors defaultRedirect="GenericError.htm"
|
||||
mode="RemoteOnly" xdt:Transform="Replace">
|
||||
<error statusCode="500" redirect="InternalError.htm"/>
|
||||
</customErrors>
|
||||
-->
|
||||
</system.web>
|
||||
</configuration>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
http://go.microsoft.com/fwlink/?LinkId=169433
|
||||
-->
|
||||
<configuration>
|
||||
<system.web>
|
||||
<compilation debug="true" targetFramework="4.0" />
|
||||
<httpHandlers>
|
||||
<add verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*" />
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<handlers>
|
||||
<add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Autofac" version="2.6.3.862" targetFramework="net40" />
|
||||
<package id="mongocsharpdriver" version="1.7" targetFramework="net40" />
|
||||
<package id="Nancy" version="0.15.3" targetFramework="net40" />
|
||||
<package id="Nancy.Bootstrappers.Autofac" version="0.15.3" targetFramework="net40" />
|
||||
<package id="Nancy.Hosting.Aspnet" version="0.15.3" targetFramework="net40" />
|
||||
<package id="NLog" version="2.0.0.2000" targetFramework="net40" />
|
||||
<package id="ServiceStack.Text" version="3.9.33" targetFramework="net40" />
|
||||
</packages>
|
|
@ -2,7 +2,6 @@
|
|||
<FileVersion>1</FileVersion>
|
||||
<AutoEnableOnStartup>False</AutoEnableOnStartup>
|
||||
<AllowParallelTestExecution>true</AllowParallelTestExecution>
|
||||
<AllowTestsToRunInParallelWithThemselves>true</AllowTestsToRunInParallelWithThemselves>
|
||||
<FrameworkUtilisationTypeForNUnit>UseDynamicAnalysis</FrameworkUtilisationTypeForNUnit>
|
||||
<FrameworkUtilisationTypeForGallio>Disabled</FrameworkUtilisationTypeForGallio>
|
||||
<FrameworkUtilisationTypeForMSpec>Disabled</FrameworkUtilisationTypeForMSpec>
|
||||
|
|
28
NzbDrone.sln
28
NzbDrone.sln
|
@ -53,6 +53,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone.Api", "NzbDrone.Ap
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone.Console", "NzbDrone\NzbDrone.Console.csproj", "{3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone.Services.Api", "NzbDrone.Services.Api\NzbDrone.Services.Api.csproj", "{A675DE45-D30A-4CAC-991A-34DA56947DD7}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -529,6 +531,31 @@ Global
|
|||
{3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Services|x64.ActiveCfg = Release|x86
|
||||
{3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Services|x86.ActiveCfg = Release|x86
|
||||
{3DCA7B58-B8B3-49AC-9D9E-56F4A0460976}.Services|x86.Build.0 = Release|x86
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Debug|x86.Build.0 = Debug|x86
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Pilot|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Pilot|Any CPU.Build.0 = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Pilot|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Pilot|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Pilot|x64.ActiveCfg = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Pilot|x86.ActiveCfg = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Services|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Services|Any CPU.Build.0 = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Services|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Services|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Services|x64.ActiveCfg = Release|Any CPU
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7}.Services|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -546,6 +573,7 @@ Global
|
|||
{700D0B95-95CD-43F3-B6C9-FAA0FC1358D4} = {F9E67978-5CD6-4A5F-827B-4249711C0B02}
|
||||
{63B155D7-AE78-4FEB-88BB-2F025ADD1F15} = {5853FEE1-D6C1-49AB-B1E3-12216491DA69}
|
||||
{12261AE5-BCC4-4DC7-A218-0764B9C30230} = {5853FEE1-D6C1-49AB-B1E3-12216491DA69}
|
||||
{A675DE45-D30A-4CAC-991A-34DA56947DD7} = {5853FEE1-D6C1-49AB-B1E3-12216491DA69}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35;packages\Unity.2.1.505.2\lib\NET35
|
||||
|
|
Loading…
Reference in New Issue