Register INotificationManager correctly; resolve services correctly
This commit is contained in:
parent
78370911c2
commit
f1d0fb1edb
|
@ -732,7 +732,7 @@ namespace Emby.Server.Implementations
|
||||||
FileSystemManager,
|
FileSystemManager,
|
||||||
ProcessFactory,
|
ProcessFactory,
|
||||||
LocalizationManager,
|
LocalizationManager,
|
||||||
ServiceProvider.GetRequiredService<ISubtitleEncoder>,
|
Resolve<ISubtitleEncoder>,
|
||||||
startupConfig,
|
startupConfig,
|
||||||
StartupOptions.FFmpegPath);
|
StartupOptions.FFmpegPath);
|
||||||
serviceCollection.AddSingleton(MediaEncoder);
|
serviceCollection.AddSingleton(MediaEncoder);
|
||||||
|
@ -807,11 +807,7 @@ namespace Emby.Server.Implementations
|
||||||
UserViewManager = new UserViewManager(LibraryManager, LocalizationManager, UserManager, ChannelManager, LiveTvManager, ServerConfigurationManager);
|
UserViewManager = new UserViewManager(LibraryManager, LocalizationManager, UserManager, ChannelManager, LiveTvManager, ServerConfigurationManager);
|
||||||
serviceCollection.AddSingleton(UserViewManager);
|
serviceCollection.AddSingleton(UserViewManager);
|
||||||
|
|
||||||
NotificationManager = new NotificationManager(
|
serviceCollection.AddSingleton<INotificationManager, NotificationManager>();
|
||||||
LoggerFactory.CreateLogger<NotificationManager>(),
|
|
||||||
UserManager,
|
|
||||||
ServerConfigurationManager);
|
|
||||||
serviceCollection.AddSingleton(NotificationManager);
|
|
||||||
|
|
||||||
serviceCollection.AddSingleton<IDeviceDiscovery, DeviceDiscovery>();
|
serviceCollection.AddSingleton<IDeviceDiscovery, DeviceDiscovery>();
|
||||||
|
|
||||||
|
@ -840,6 +836,7 @@ namespace Emby.Server.Implementations
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void InitializeServices()
|
public void InitializeServices()
|
||||||
{
|
{
|
||||||
|
NotificationManager = Resolve<INotificationManager>();
|
||||||
HttpServer = Resolve<IHttpServer>();
|
HttpServer = Resolve<IHttpServer>();
|
||||||
|
|
||||||
((ActivityRepository)Resolve<IActivityRepository>()).Initialize();
|
((ActivityRepository)Resolve<IActivityRepository>()).Initialize();
|
||||||
|
@ -972,7 +969,7 @@ namespace Emby.Server.Implementations
|
||||||
CollectionFolder.XmlSerializer = XmlSerializer;
|
CollectionFolder.XmlSerializer = XmlSerializer;
|
||||||
CollectionFolder.JsonSerializer = JsonSerializer;
|
CollectionFolder.JsonSerializer = JsonSerializer;
|
||||||
CollectionFolder.ApplicationHost = this;
|
CollectionFolder.ApplicationHost = this;
|
||||||
AuthenticatedAttribute.AuthService = ServiceProvider.GetRequiredService<IAuthService>();
|
AuthenticatedAttribute.AuthService = Resolve<IAuthService>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void PluginInstalled(object sender, GenericEventArgs<PackageVersionInfo> args)
|
private async void PluginInstalled(object sender, GenericEventArgs<PackageVersionInfo> args)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user