Allow plugins to register services.

This commit is contained in:
Patrick Barron
2020-08-16 17:25:14 -04:00
parent 075ae53d83
commit a77cf53573
7 changed files with 126 additions and 93 deletions

View File

@@ -154,13 +154,15 @@ namespace Jellyfin.Server
ApplicationHost.LogEnvironmentInfo(_logger, appPaths);
PerformStaticInitialization();
var serviceCollection = new ServiceCollection();
var appHost = new CoreAppHost(
appPaths,
_loggerFactory,
options,
new ManagedFileSystem(_loggerFactory.CreateLogger<ManagedFileSystem>(), appPaths),
new NetworkManager(_loggerFactory.CreateLogger<NetworkManager>()));
new NetworkManager(_loggerFactory.CreateLogger<NetworkManager>()),
serviceCollection);
try
{
@@ -178,8 +180,7 @@ namespace Jellyfin.Server
}
}
ServiceCollection serviceCollection = new ServiceCollection();
appHost.Init(serviceCollection);
appHost.Init();
var webHost = new WebHostBuilder().ConfigureWebHostBuilder(appHost, serviceCollection, options, startupConfig, appPaths).Build();