@ -160,7 +160,7 @@ namespace MediaBrowser.ServerApplication
/// Gets or sets the user data repository.
/// </summary>
/// <value>The user data repository.</value>
private IUserData Repository UserDataRepository { get ; set ; }
private IUserData Manager UserDataManager { get ; set ; }
private IUserRepository UserRepository { get ; set ; }
internal IDisplayPreferencesRepository DisplayPreferencesRepository { get ; set ; }
private IItemRepository ItemRepository { get ; set ; }
@ -238,8 +238,8 @@ namespace MediaBrowser.ServerApplication
var mediaEncoderTask = RegisterMediaEncoder ( ) ;
UserData Repository = new SqliteUserDataRepository ( ApplicationPaths , JsonSerializer , LogManager ) ;
RegisterSingleInstance ( UserData Repository ) ;
UserData Manager = new UserDataManager ( ) ;
RegisterSingleInstance ( UserData Manager ) ;
UserRepository = await GetUserRepository ( ) . ConfigureAwait ( false ) ;
RegisterSingleInstance ( UserRepository ) ;
@ -253,7 +253,7 @@ namespace MediaBrowser.ServerApplication
UserManager = new UserManager ( Logger , ServerConfigurationManager , UserRepository ) ;
RegisterSingleInstance ( UserManager ) ;
LibraryManager = new LibraryManager ( Logger , TaskManager , UserManager , ServerConfigurationManager , UserData Repository , ( ) = > DirectoryWatchers ) ;
LibraryManager = new LibraryManager ( Logger , TaskManager , UserManager , ServerConfigurationManager , UserData Manager , ( ) = > DirectoryWatchers ) ;
RegisterSingleInstance ( LibraryManager ) ;
DirectoryWatchers = new DirectoryWatchers ( LogManager , TaskManager , LibraryManager , ServerConfigurationManager ) ;
@ -264,7 +264,7 @@ namespace MediaBrowser.ServerApplication
RegisterSingleInstance < ILibrarySearchEngine > ( ( ) = > new LuceneSearchEngine ( ApplicationPaths , LogManager , LibraryManager ) ) ;
SessionManager = new SessionManager ( UserData Repository , ServerConfigurationManager , Logger , UserRepository ) ;
SessionManager = new SessionManager ( UserData Manager , ServerConfigurationManager , Logger , UserRepository ) ;
RegisterSingleInstance ( SessionManager ) ;
HttpServer = await _httpServerCreationTask . ConfigureAwait ( false ) ;
@ -279,7 +279,7 @@ namespace MediaBrowser.ServerApplication
ImageProcessor = new ImageProcessor ( Logger , ServerConfigurationManager . ApplicationPaths ) ;
RegisterSingleInstance ( ImageProcessor ) ;
DtoService = new DtoService ( Logger , LibraryManager , UserManager , UserData Repository , ItemRepository , ImageProcessor ) ;
DtoService = new DtoService ( Logger , LibraryManager , UserManager , UserData Manager , ItemRepository , ImageProcessor ) ;
RegisterSingleInstance ( DtoService ) ;
LiveTvManager = new LiveTvManager ( ) ;
@ -372,9 +372,13 @@ namespace MediaBrowser.ServerApplication
/// Configures the user data repositories.
/// </summary>
/// <returns>Task.</returns>
private Task ConfigureUserDataRepositories ( )
private async Task ConfigureUserDataRepositories ( )
{
return UserDataRepository . Initialize ( ) ;
var repo = new SqliteUserDataRepository ( ApplicationPaths , JsonSerializer , LogManager ) ;
await repo . Initialize ( ) . ConfigureAwait ( false ) ;
( ( UserDataManager ) UserDataManager ) . Repository = repo ;
}
/// <summary>