diff options
Diffstat (limited to 'Emby.Server.Core')
| -rw-r--r-- | Emby.Server.Core/HttpServerFactory.cs | 4 | ||||
| -rw-r--r-- | Emby.Server.Core/Localization/TextLocalizer.cs | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/Emby.Server.Core/HttpServerFactory.cs b/Emby.Server.Core/HttpServerFactory.cs index 8ec5fb026..deed3c6f3 100644 --- a/Emby.Server.Core/HttpServerFactory.cs +++ b/Emby.Server.Core/HttpServerFactory.cs @@ -76,9 +76,9 @@ namespace Emby.Server.Core public class StreamFactory : IStreamFactory { - public Stream CreateNetworkStream(ISocket socket, bool ownsSocket) + public Stream CreateNetworkStream(IAcceptSocket acceptSocket, bool ownsSocket) { - var netSocket = (NetSocket)socket; + var netSocket = (NetAcceptSocket)acceptSocket; return new NetworkStream(netSocket.Socket, ownsSocket); } diff --git a/Emby.Server.Core/Localization/TextLocalizer.cs b/Emby.Server.Core/Localization/TextLocalizer.cs index 6690c6263..1e8ccbbfa 100644 --- a/Emby.Server.Core/Localization/TextLocalizer.cs +++ b/Emby.Server.Core/Localization/TextLocalizer.cs @@ -39,7 +39,15 @@ namespace Emby.Server.Core.Localization } } - return text.Normalize(form); + try + { + return text.Normalize(form); + } + catch (ArgumentException) + { + // if it still fails, return the original text + return text; + } } private static string StripInvalidUnicodeCharacters(string str) |
