aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-04-04 12:33:25 -0400
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-04-04 12:33:25 -0400
commit92b0d40ad40cdf0e35ecd1a9e1680fd5b8e6ef2f (patch)
tree4d6a2f40cb48655febdbe0d27995f3989cfd8898
parente9e12b8eb97947f3387dcfac00fe9aa5e845d9e9 (diff)
Move service initializations into correct method
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs19
1 files changed, 10 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 27dd0ec1a..f98532035 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -851,6 +851,16 @@ namespace Emby.Server.Implementations
serviceCollection.AddSingleton<EncodingHelper>();
serviceCollection.AddSingleton(typeof(IAttachmentExtractor), typeof(MediaBrowser.MediaEncoding.Attachments.AttachmentExtractor));
+ }
+
+ /// <summary>
+ /// Create services registered with the service container that need to be initialized at application startup.
+ /// </summary>
+ public void InitializeServices()
+ {
+ HttpServer = Resolve<IHttpServer>();
+ AuthService = Resolve<IAuthService>();
+ SubtitleEncoder = Resolve<ISubtitleEncoder>();
_displayPreferencesRepository.Initialize();
@@ -865,15 +875,6 @@ namespace Emby.Server.Implementations
((LibraryManager)LibraryManager).ItemRepository = ItemRepository;
}
- /// <summary>
- /// Create services registered with the service container that need to be initialized at application startup.
- /// </summary>
- public void InitializeServices()
- {
- HttpServer = Resolve<IHttpServer>();
- SubtitleEncoder = Resolve<ISubtitleEncoder>();
- }
-
public static void LogEnvironmentInfo(ILogger logger, IApplicationPaths appPaths)
{
// Distinct these to prevent users from reporting problems that aren't actually problems