aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Program.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2019-12-18 08:54:40 +0900
committerGitHub <noreply@github.com>2019-12-18 08:54:40 +0900
commitbc7cbfb21aced3ad72ddd98183ad457e50b48dc8 (patch)
treee9766356fdc2106874f491deab5b67a0964f5a35 /Jellyfin.Server/Program.cs
parent0f444c21e9d2e2e8dbb4c454cc7d3dc467de8d32 (diff)
parent6464bca791b515cac3059fd6e166149b18b5086f (diff)
Merge pull request #1941 from Bond-009/mediaencoding
Make probesize and analyzeduration configurable and simplify circular dependencies
Diffstat (limited to 'Jellyfin.Server/Program.cs')
-rw-r--r--Jellyfin.Server/Program.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 5ac005b40..712990a1e 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -7,6 +7,7 @@ using System.Net;
using System.Net.Security;
using System.Reflection;
using System.Runtime.InteropServices;
+using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
@@ -145,6 +146,10 @@ namespace Jellyfin.Server
ApplicationHost.LogEnvironmentInfo(_logger, appPaths);
+ // Make sure we have all the code pages we can get
+ // Ref: https://docs.microsoft.com/en-us/dotnet/api/system.text.codepagesencodingprovider.instance?view=netcore-3.0#remarks
+ Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
+
// Increase the max http request limit
// The default connection limit is 10 for ASP.NET hosted applications and 2 for all others.
ServicePointManager.DefaultConnectionLimit = Math.Max(96, ServicePointManager.DefaultConnectionLimit);
@@ -456,9 +461,9 @@ namespace Jellyfin.Server
return new ConfigurationBuilder()
.SetBasePath(appPaths.ConfigurationDirectoryPath)
+ .AddInMemoryCollection(ConfigurationOptions.Configuration)
.AddJsonFile("logging.json", false, true)
.AddEnvironmentVariables("JELLYFIN_")
- .AddInMemoryCollection(ConfigurationOptions.Configuration)
.Build();
}