From c7c72dd1a89217f48cb48db93d9ee1fa5ee6171d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 1 May 2014 22:54:33 -0400 Subject: web client re-org --- .../EntryPoints/ExternalPortForwarding.cs | 6 ++---- .../HttpServer/HttpListenerHost.cs | 14 ++++++++++---- .../Localization/Server/server.json | 3 ++- .../MediaBrowser.Server.Implementations.csproj | 4 ++-- MediaBrowser.Server.Implementations/packages.config | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) (limited to 'MediaBrowser.Server.Implementations') diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs index 098d1295f..04ddb4c4b 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs @@ -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; diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs index 009e4716d..cfe5ef4f0 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -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; + } + /// /// Shut down the Web Service /// @@ -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); diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json index 72c341057..9d9a6b0a9 100644 --- a/MediaBrowser.Server.Implementations/Localization/Server/server.json +++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json @@ -620,5 +620,6 @@ "NotificationOptionPluginError": "Plugin failure", "ButtonVolumeUp": "Volume up", "ButtonVolumeDown": "Volume down", - "ButtonMute": "Mute" + "ButtonMute": "Mute", + "HeaderLatestMedia": "Latest Media" } \ No newline at end of file diff --git a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj index d86ff8aac..6e5e58d26 100644 --- a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj +++ b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj @@ -48,9 +48,9 @@ ..\packages\Alchemy.2.2.1\lib\net40\Alchemy.dll - + False - ..\packages\Mono.Nat.1.2.3\lib\Net40\Mono.Nat.dll + ..\packages\Mono.Nat.1.2.7.0\lib\net40\Mono.Nat.dll ..\ThirdParty\ServiceStack\ServiceStack.Api.Swagger.dll diff --git a/MediaBrowser.Server.Implementations/packages.config b/MediaBrowser.Server.Implementations/packages.config index d82e880c9..9b44f9c61 100644 --- a/MediaBrowser.Server.Implementations/packages.config +++ b/MediaBrowser.Server.Implementations/packages.config @@ -1,7 +1,7 @@  - + \ No newline at end of file -- cgit v1.2.3