mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Register and initialize IActivityRepository correctly
This commit is contained in:
parent
3dbbe54f6c
commit
4ba07b114d
@ -834,9 +834,8 @@ namespace Emby.Server.Implementations
|
||||
LibraryManager);
|
||||
serviceCollection.AddSingleton(EncodingManager);
|
||||
|
||||
var activityLogRepo = GetActivityLogRepository();
|
||||
serviceCollection.AddSingleton(activityLogRepo);
|
||||
serviceCollection.AddSingleton<IActivityManager>(new ActivityManager(LoggerFactory, activityLogRepo, UserManager));
|
||||
serviceCollection.AddSingleton<IActivityRepository, ActivityRepository>();
|
||||
serviceCollection.AddSingleton<IActivityManager, ActivityManager>();
|
||||
|
||||
serviceCollection.AddSingleton<IAuthorizationContext, AuthorizationContext>();
|
||||
serviceCollection.AddSingleton<ISessionContext, SessionContext>();
|
||||
@ -860,6 +859,7 @@ namespace Emby.Server.Implementations
|
||||
AuthService = Resolve<IAuthService>();
|
||||
SubtitleEncoder = Resolve<ISubtitleEncoder>();
|
||||
|
||||
((ActivityRepository)Resolve<IActivityRepository>()).Initialize();
|
||||
_displayPreferencesRepository.Initialize();
|
||||
|
||||
var userDataRepo = new SqliteUserDataRepository(LoggerFactory.CreateLogger<SqliteUserDataRepository>(), ApplicationPaths);
|
||||
@ -963,15 +963,6 @@ namespace Emby.Server.Implementations
|
||||
return repo;
|
||||
}
|
||||
|
||||
private IActivityRepository GetActivityLogRepository()
|
||||
{
|
||||
var repo = new ActivityRepository(LoggerFactory, ServerConfigurationManager.ApplicationPaths, FileSystemManager);
|
||||
|
||||
repo.Initialize();
|
||||
|
||||
return repo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dirty hacks.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user