web client re-org

This commit is contained in:
Luke Pulverenti
2014-05-01 22:54:33 -04:00
parent c741082dfd
commit c7c72dd1a8
12 changed files with 95 additions and 28 deletions

View File

@@ -3,8 +3,6 @@ using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Model.Logging;
using Mono.Nat;
using Mono.Nat.Enums;
using Mono.Nat.EventArgs;
using System;
using System.IO;
using System.Text;
@@ -19,9 +17,9 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
private bool _isStarted;
public ExternalPortForwarding(ILogger logger, IServerApplicationHost appHost, IServerConfigurationManager config)
public ExternalPortForwarding(ILogManager logmanager, IServerApplicationHost appHost, IServerConfigurationManager config)
{
_logger = logger;
_logger = logmanager.GetLogger("PortMapper");
_appHost = appHost;
_config = config;

View File

@@ -1,4 +1,5 @@
using System.Net.Sockets;
using System.Runtime.Serialization;
using Funq;
using MediaBrowser.Common;
using MediaBrowser.Common.Extensions;
@@ -246,8 +247,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
_autoResetEvents[index].Set();
}
if (context == null) return;
var date = DateTime.Now;
Task.Factory.StartNew(async () =>
@@ -375,7 +374,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
};
var operationName = context.Request.GetOperationName();
var httpReq = context.ToRequest(operationName);
var httpReq = GetRequest(context, operationName);
var httpRes = httpReq.Response;
var contentType = httpReq.ResponseContentType;
@@ -409,6 +408,13 @@ namespace MediaBrowser.Server.Implementations.HttpServer
}
}
private static ListenerRequest GetRequest(HttpListenerContext httpContext, string operationName)
{
var req = new ListenerRequest(httpContext, operationName, RequestAttributes.None);
req.RequestAttributes = req.GetAttributes();
return req;
}
/// <summary>
/// Shut down the Web Service
/// </summary>
@@ -436,7 +442,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
var operationName = context.Request.GetOperationName();
var httpReq = context.ToRequest(operationName);
var httpReq = GetRequest(context, operationName);
var httpRes = httpReq.Response;
var handler = HttpHandlerFactory.GetHandler(httpReq);

View File

@@ -620,5 +620,6 @@
"NotificationOptionPluginError": "Plugin failure",
"ButtonVolumeUp": "Volume up",
"ButtonVolumeDown": "Volume down",
"ButtonMute": "Mute"
"ButtonMute": "Mute",
"HeaderLatestMedia": "Latest Media"
}

View File

@@ -48,9 +48,9 @@
<Reference Include="Alchemy">
<HintPath>..\packages\Alchemy.2.2.1\lib\net40\Alchemy.dll</HintPath>
</Reference>
<Reference Include="Mono.Nat, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Mono.Nat, Version=1.2.7.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Mono.Nat.1.2.3\lib\Net40\Mono.Nat.dll</HintPath>
<HintPath>..\packages\Mono.Nat.1.2.7.0\lib\net40\Mono.Nat.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Api.Swagger">
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.Api.Swagger.dll</HintPath>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Alchemy" version="2.2.1" targetFramework="net45" />
<package id="Mono.Nat" version="1.2.3" targetFramework="net45" />
<package id="Mono.Nat" version="1.2.7.0" targetFramework="net45" />
<package id="morelinq" version="1.0.16006" targetFramework="net45" />
<package id="System.Data.SQLite.Core" version="1.0.91.3" targetFramework="net45" />
</packages>