From c5b845cbeecb5a66e4041b500be20fbcb96f9c90 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 2 Mar 2013 13:37:28 -0800 Subject: [PATCH] Removed tvdblib from tests Added settings to API --- NzbDrone.Api/NzbDrone.Api.csproj | 1 + NzbDrone.Api/Settings/SettingsModule.cs | 25 +++++++++++++++++++ NzbDrone.Console/NzbDrone.Console.csproj | 5 ++-- .../ConvertToDayOfWeekFixture.cs | 2 -- NzbDrone.Core.Test/NzbDrone.Core.Test.csproj | 4 --- .../RecycleBinProviderTests/CleanupFixture.cs | 2 -- .../DeleteDirectoryFixture.cs | 2 -- .../DeleteFileFixture.cs | 2 -- .../RecycleBinProviderTests/EmptyFixture.cs | 2 -- .../ProviderTests/TvDbProviderTest.cs | 5 ++-- .../TvRageProviderTests/GetSeriesFixture.cs | 2 -- .../GetUtcOffsetFixture.cs | 2 -- .../SearchSeriesFixture.cs | 2 -- NzbDrone.ncrunchsolution | 1 - NzbDrone.sln | 20 --------------- NzbDrone/NzbDrone.csproj | 5 ++-- 16 files changed, 32 insertions(+), 50 deletions(-) create mode 100644 NzbDrone.Api/Settings/SettingsModule.cs diff --git a/NzbDrone.Api/NzbDrone.Api.csproj b/NzbDrone.Api/NzbDrone.Api.csproj index 2199e31d5..c708953b9 100644 --- a/NzbDrone.Api/NzbDrone.Api.csproj +++ b/NzbDrone.Api/NzbDrone.Api.csproj @@ -144,6 +144,7 @@ + diff --git a/NzbDrone.Api/Settings/SettingsModule.cs b/NzbDrone.Api/Settings/SettingsModule.cs new file mode 100644 index 000000000..e42251347 --- /dev/null +++ b/NzbDrone.Api/Settings/SettingsModule.cs @@ -0,0 +1,25 @@ +using System.Linq; +using Nancy; +using NzbDrone.Api.Extensions; +using NzbDrone.Core.Configuration; + +namespace NzbDrone.Api.Settings +{ + public class SettingsModule : NzbDroneApiModule + { + private readonly ConfigService _configService; + + public SettingsModule(ConfigService configService) + : base("/settings") + { + _configService = configService; + Get["/"] = x => GetAllSettings(); + } + + private Response GetAllSettings() + { + var settings = _configService.All(); + return settings.AsResponse(); + } + } +} \ No newline at end of file diff --git a/NzbDrone.Console/NzbDrone.Console.csproj b/NzbDrone.Console/NzbDrone.Console.csproj index ff57da500..595e60473 100644 --- a/NzbDrone.Console/NzbDrone.Console.csproj +++ b/NzbDrone.Console/NzbDrone.Console.csproj @@ -124,9 +124,8 @@ - if not exist "$(TargetDir)x86" md "$(TargetDir)x86" - -xcopy /s /y "$(SolutionDir)\SqlCe\*.*" "$(TargetDir)" + +