Remove old instantiation of serviceProvider in app host
This commit is contained in:
parent
e5d57bd82f
commit
c011fa2ea8
|
@ -663,6 +663,7 @@ namespace Emby.Server.Implementations
|
||||||
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2)
|
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2)
|
||||||
.AddApplicationPart(Assembly.Load("Jellyfin.Api"));
|
.AddApplicationPart(Assembly.Load("Jellyfin.Api"));
|
||||||
services.AddApiVersioning(opt => opt.ReportApiVersions = true);
|
services.AddApiVersioning(opt => opt.ReportApiVersions = true);
|
||||||
|
// Merge the external ServiceCollection into ASP.NET DI
|
||||||
services.TryAdd(serviceCollection);
|
services.TryAdd(serviceCollection);
|
||||||
})
|
})
|
||||||
.Configure(app =>
|
.Configure(app =>
|
||||||
|
@ -929,8 +930,6 @@ namespace Emby.Server.Implementations
|
||||||
((UserDataManager)UserDataManager).Repository = userDataRepo;
|
((UserDataManager)UserDataManager).Repository = userDataRepo;
|
||||||
ItemRepository.Initialize(userDataRepo, UserManager);
|
ItemRepository.Initialize(userDataRepo, UserManager);
|
||||||
((LibraryManager)LibraryManager).ItemRepository = ItemRepository;
|
((LibraryManager)LibraryManager).ItemRepository = ItemRepository;
|
||||||
|
|
||||||
_serviceProvider = serviceCollection.BuildServiceProvider();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LogEnvironmentInfo(ILogger logger, IApplicationPaths appPaths)
|
public static void LogEnvironmentInfo(ILogger logger, IApplicationPaths appPaths)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user