aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Program.cs
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-03-15 15:23:50 +0100
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-03-15 15:28:29 +0100
commit6fbdf0d6a20d8bf230cbf2ba002612b49fa45b76 (patch)
treee25ba62bd6fff65d010b87ca0517a9340d343dd2 /Jellyfin.Server/Program.cs
parent6a6293afc774001743985d615d651ca4a877bfd7 (diff)
Construct ApplicationHost with DI framework instead of manually
Diffstat (limited to 'Jellyfin.Server/Program.cs')
-rw-r--r--Jellyfin.Server/Program.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index c839867f1..cb886b8ce 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -191,8 +191,9 @@ namespace Jellyfin.Server
var webHost = CreateWebHostBuilder(appHost, serviceCollection, startupConfig, appPaths).Build();
- // A bit hacky to re-use service provider since ASP.NET doesn't allow a custom service collection.
+ // 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();
Migrations.MigrationRunner.Run(appHost, _loggerFactory);