aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Core
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Core')
-rw-r--r--Emby.Server.Core/ApplicationHost.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Emby.Server.Core/ApplicationHost.cs b/Emby.Server.Core/ApplicationHost.cs
index 3b3313169d..a0a7416e7b 100644
--- a/Emby.Server.Core/ApplicationHost.cs
+++ b/Emby.Server.Core/ApplicationHost.cs
@@ -548,6 +548,8 @@ namespace Emby.Server.Core
RegisterSingleInstance(UserDataManager);
UserRepository = GetUserRepository();
+ // This is only needed for disposal purposes. If removing this, make sure to have the manager handle disposing it
+ RegisterSingleInstance(UserRepository);
var displayPreferencesRepo = new SqliteDisplayPreferencesRepository(LogManager.GetLogger("SqliteDisplayPreferencesRepository"), JsonSerializer, ApplicationPaths, MemoryStreamFactory);
DisplayPreferencesRepository = displayPreferencesRepo;
@@ -678,6 +680,8 @@ namespace Emby.Server.Core
var sharingRepo = new SharingRepository(LogManager.GetLogger("SharingRepository"), ApplicationPaths);
sharingRepo.Initialize();
+ // This is only needed for disposal purposes. If removing this, make sure to have the manager handle disposing it
+ RegisterSingleInstance<ISharingRepository>(sharingRepo);
RegisterSingleInstance<ISharingManager>(new SharingManager(sharingRepo, ServerConfigurationManager, LibraryManager, this));
var activityLogRepo = GetActivityLogRepository();