Register IEncodingManager correctly; remove unnecessary properties in ApplicationHost
This commit is contained in:
parent
4ba07b114d
commit
7884c3813d
|
@ -282,16 +282,12 @@ namespace Emby.Server.Implementations
|
||||||
/// <value>The media encoder.</value>
|
/// <value>The media encoder.</value>
|
||||||
private IMediaEncoder MediaEncoder { get; set; }
|
private IMediaEncoder MediaEncoder { get; set; }
|
||||||
|
|
||||||
private ISubtitleEncoder SubtitleEncoder { get; set; }
|
|
||||||
|
|
||||||
private ISessionManager SessionManager { get; set; }
|
private ISessionManager SessionManager { get; set; }
|
||||||
|
|
||||||
private ILiveTvManager LiveTvManager { get; set; }
|
private ILiveTvManager LiveTvManager { get; set; }
|
||||||
|
|
||||||
public LocalizationManager LocalizationManager { get; set; }
|
public LocalizationManager LocalizationManager { get; set; }
|
||||||
|
|
||||||
private IEncodingManager EncodingManager { get; set; }
|
|
||||||
|
|
||||||
private IChannelManager ChannelManager { get; set; }
|
private IChannelManager ChannelManager { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -326,8 +322,6 @@ namespace Emby.Server.Implementations
|
||||||
/// <value>The installation manager.</value>
|
/// <value>The installation manager.</value>
|
||||||
protected IInstallationManager InstallationManager { get; private set; }
|
protected IInstallationManager InstallationManager { get; private set; }
|
||||||
|
|
||||||
protected IAuthService AuthService { get; private set; }
|
|
||||||
|
|
||||||
public IStartupOptions StartupOptions { get; }
|
public IStartupOptions StartupOptions { get; }
|
||||||
|
|
||||||
internal IImageEncoder ImageEncoder { get; private set; }
|
internal IImageEncoder ImageEncoder { get; private set; }
|
||||||
|
@ -740,7 +734,7 @@ namespace Emby.Server.Implementations
|
||||||
FileSystemManager,
|
FileSystemManager,
|
||||||
ProcessFactory,
|
ProcessFactory,
|
||||||
LocalizationManager,
|
LocalizationManager,
|
||||||
() => SubtitleEncoder,
|
ServiceProvider.GetRequiredService<ISubtitleEncoder>,
|
||||||
startupConfig,
|
startupConfig,
|
||||||
StartupOptions.FFmpegPath);
|
StartupOptions.FFmpegPath);
|
||||||
serviceCollection.AddSingleton(MediaEncoder);
|
serviceCollection.AddSingleton(MediaEncoder);
|
||||||
|
@ -826,13 +820,7 @@ namespace Emby.Server.Implementations
|
||||||
ChapterManager = new ChapterManager(ItemRepository);
|
ChapterManager = new ChapterManager(ItemRepository);
|
||||||
serviceCollection.AddSingleton(ChapterManager);
|
serviceCollection.AddSingleton(ChapterManager);
|
||||||
|
|
||||||
EncodingManager = new MediaEncoder.EncodingManager(
|
serviceCollection.AddSingleton<IEncodingManager, MediaEncoder.EncodingManager>();
|
||||||
LoggerFactory.CreateLogger<MediaEncoder.EncodingManager>(),
|
|
||||||
FileSystemManager,
|
|
||||||
MediaEncoder,
|
|
||||||
ChapterManager,
|
|
||||||
LibraryManager);
|
|
||||||
serviceCollection.AddSingleton(EncodingManager);
|
|
||||||
|
|
||||||
serviceCollection.AddSingleton<IActivityRepository, ActivityRepository>();
|
serviceCollection.AddSingleton<IActivityRepository, ActivityRepository>();
|
||||||
serviceCollection.AddSingleton<IActivityManager, ActivityManager>();
|
serviceCollection.AddSingleton<IActivityManager, ActivityManager>();
|
||||||
|
@ -856,8 +844,6 @@ namespace Emby.Server.Implementations
|
||||||
public void InitializeServices()
|
public void InitializeServices()
|
||||||
{
|
{
|
||||||
HttpServer = Resolve<IHttpServer>();
|
HttpServer = Resolve<IHttpServer>();
|
||||||
AuthService = Resolve<IAuthService>();
|
|
||||||
SubtitleEncoder = Resolve<ISubtitleEncoder>();
|
|
||||||
|
|
||||||
((ActivityRepository)Resolve<IActivityRepository>()).Initialize();
|
((ActivityRepository)Resolve<IActivityRepository>()).Initialize();
|
||||||
_displayPreferencesRepository.Initialize();
|
_displayPreferencesRepository.Initialize();
|
||||||
|
@ -989,7 +975,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 = AuthService;
|
AuthenticatedAttribute.AuthService = ServiceProvider.GetRequiredService<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