This commit is contained in:
Bond_009 2019-01-26 18:27:57 +01:00
parent 07f163a4c3
commit 2ffab720fb
2 changed files with 5 additions and 9 deletions

View File

@ -317,7 +317,7 @@ namespace Emby.Server.Implementations
private IUserDataManager UserDataManager { get; set; } private IUserDataManager UserDataManager { get; set; }
private IUserRepository UserRepository { get; set; } private IUserRepository UserRepository { get; set; }
internal IDisplayPreferencesRepository DisplayPreferencesRepository { get; set; } internal IDisplayPreferencesRepository DisplayPreferencesRepository { get; set; }
internal IItemRepository ItemRepository { get; set; } internal SqliteItemRepository ItemRepository { get; set; }
private INotificationManager NotificationManager { get; set; } private INotificationManager NotificationManager { get; set; }
private ISubtitleManager SubtitleManager { get; set; } private ISubtitleManager SubtitleManager { get; set; }
@ -836,9 +836,8 @@ namespace Emby.Server.Implementations
DisplayPreferencesRepository = displayPreferencesRepo; DisplayPreferencesRepository = displayPreferencesRepo;
RegisterSingleInstance(DisplayPreferencesRepository); RegisterSingleInstance(DisplayPreferencesRepository);
var itemRepo = new SqliteItemRepository(ServerConfigurationManager, this, JsonSerializer, LoggerFactory, assemblyInfo, FileSystemManager, EnvironmentInfo, TimerFactory); ItemRepository = new SqliteItemRepository(ServerConfigurationManager, this, JsonSerializer, LoggerFactory, assemblyInfo);
ItemRepository = itemRepo; RegisterSingleInstance<IItemRepository>(ItemRepository);
RegisterSingleInstance(ItemRepository);
AuthenticationRepository = GetAuthenticationRepository(); AuthenticationRepository = GetAuthenticationRepository();
RegisterSingleInstance(AuthenticationRepository); RegisterSingleInstance(AuthenticationRepository);
@ -956,7 +955,7 @@ namespace Emby.Server.Implementations
((UserManager)UserManager).Initialize(); ((UserManager)UserManager).Initialize();
((UserDataManager)UserDataManager).Repository = userDataRepo; ((UserDataManager)UserDataManager).Repository = userDataRepo;
itemRepo.Initialize(userDataRepo, UserManager); ItemRepository.Initialize(userDataRepo, UserManager);
((LibraryManager)LibraryManager).ItemRepository = ItemRepository; ((LibraryManager)LibraryManager).ItemRepository = ItemRepository;
} }

View File

@ -69,10 +69,7 @@ namespace Emby.Server.Implementations.Data
IServerApplicationHost appHost, IServerApplicationHost appHost,
IJsonSerializer jsonSerializer, IJsonSerializer jsonSerializer,
ILoggerFactory loggerFactory, ILoggerFactory loggerFactory,
IAssemblyInfo assemblyInfo, IAssemblyInfo assemblyInfo)
IFileSystem fileSystem,
IEnvironmentInfo environmentInfo,
ITimerFactory timerFactory)
: base(loggerFactory.CreateLogger(nameof(SqliteItemRepository))) : base(loggerFactory.CreateLogger(nameof(SqliteItemRepository)))
{ {
if (config == null) if (config == null)