Fixed the plex friends. Added some unit tests, moved the plex auth into it's own page

This commit is contained in:
tidusjar 2016-03-04 12:45:42 +00:00
parent d6f3f7b750
commit 07beddc26a
22 changed files with 602 additions and 151 deletions

View file

@ -25,7 +25,6 @@
// ************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Data;
using Microsoft.Owin.Hosting;
@ -34,8 +33,6 @@ using Mono.Data.Sqlite;
using NLog;
using NLog.Config;
using NLog.LayoutRenderers;
using NLog.Layouts;
using NLog.Targets;
using PlexRequests.Core;
@ -77,7 +74,7 @@ namespace PlexRequests.UI
private static string GetStartupUri()
{
var uri = "http://localhost:3579/";
var service = new SettingsServiceV2<RequestPlexSettings>(new JsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider()));
var service = new SettingsServiceV2<PlexRequestSettings>(new JsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider()));
var settings = service.GetSettings();
if (settings.Port != 0)
@ -95,9 +92,13 @@ namespace PlexRequests.UI
var config = new LoggingConfiguration();
// Step 2. Create targets and add them to the configuration
var databaseTarget = new DatabaseTarget { CommandType = CommandType.Text,ConnectionString = connectionString,
var databaseTarget = new DatabaseTarget
{
CommandType = CommandType.Text,
ConnectionString = connectionString,
DBProvider = "Mono.Data.Sqlite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756",
Name = "database"};
Name = "database"
};
var messageParam = new DatabaseParameterInfo { Name = "@Message", Layout = "${message}" };
@ -131,7 +132,7 @@ namespace PlexRequests.UI
}
catch (Exception e)
{
throw;
}