localization fixes

This commit is contained in:
Luke Pulverenti
2017-02-12 20:07:48 -05:00
parent a6e7438987
commit 0a03d7ad9f
22 changed files with 513 additions and 882 deletions

View File

@@ -13,10 +13,10 @@ using System.Text;
using System.Threading.Tasks;
using System.Xml;
using Emby.Server.Implementations.HttpServer;
using Emby.Server.Implementations.Services;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Services;
using ServiceStack;
using ServiceStack.Host;
using IRequest = MediaBrowser.Model.Services.IRequest;
using MimeTypes = MediaBrowser.Model.Net.MimeTypes;
using StreamWriter = Emby.Server.Implementations.HttpServer.StreamWriter;
@@ -203,7 +203,11 @@ namespace Emby.Server.Implementations.HttpServer
// Do not use the memoryStreamFactory here, they don't place nice with compression
using (var ms = new MemoryStream())
{
ContentTypes.Instance.SerializeToStream(request, dto, ms);
var contentType = request.ResponseContentType;
var writerFn = RequestHelper.GetResponseWriter(contentType);
writerFn(dto, ms);
ms.Position = 0;
var responseHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);