mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
Construct ApplicationHost with DI framework instead of manually
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user