aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Program.cs
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-04-23 18:54:13 -0400
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-04-23 19:32:40 -0400
commitcd989381908203e02139d403955cf70c0c818dd8 (patch)
tree890d927f09eb310100b1c6f9ad52ddf921271f8a /Jellyfin.Server/Program.cs
parent24ed6397250df484b71ebfb3b428d31e4d05f510 (diff)
parentaa6d52277dfbc074016d7623f114325a5edc3cbe (diff)
Merge remote-tracking branch 'upstream/master' into integration-tests
Diffstat (limited to 'Jellyfin.Server/Program.cs')
-rw-r--r--Jellyfin.Server/Program.cs25
1 files changed, 2 insertions, 23 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index eb19f57a9..f9cbcecea 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -168,7 +168,6 @@ namespace Jellyfin.Server
_loggerFactory,
options,
new ManagedFileSystem(_loggerFactory.CreateLogger<ManagedFileSystem>(), appPaths),
- GetImageEncoder(appPaths),
new NetworkManager(_loggerFactory.CreateLogger<NetworkManager>()));
try
@@ -188,14 +187,13 @@ namespace Jellyfin.Server
}
ServiceCollection serviceCollection = new ServiceCollection();
- await appHost.InitAsync(serviceCollection, startupConfig).ConfigureAwait(false);
+ appHost.Init(serviceCollection);
var webHost = new WebHostBuilder().ConfigureWebHostBuilder(appHost, serviceCollection, options, startupConfig, appPaths).Build();
// Re-use the web host service provider in the app host since ASP.NET doesn't allow a custom service collection.
appHost.ServiceProvider = webHost.Services;
- appHost.InitializeServices();
- appHost.FindParts();
+ await appHost.InitializeServices().ConfigureAwait(false);
Migrations.MigrationRunner.Run(appHost, _loggerFactory);
try
@@ -598,25 +596,6 @@ namespace Jellyfin.Server
}
}
- private static IImageEncoder GetImageEncoder(IApplicationPaths appPaths)
- {
- try
- {
- // Test if the native lib is available
- SkiaEncoder.TestSkia();
-
- return new SkiaEncoder(
- _loggerFactory.CreateLogger<SkiaEncoder>(),
- appPaths);
- }
- catch (Exception ex)
- {
- _logger.LogWarning(ex, $"Skia not available. Will fallback to {nameof(NullImageEncoder)}.");
- }
-
- return new NullImageEncoder();
- }
-
private static void StartNewInstance(StartupOptions options)
{
_logger.LogInformation("Starting new instance");