From f2a9b76be2d6e616b510ed71cb7858b3757ec74d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Apr 2013 23:05:19 -0400 Subject: [PATCH 1/2] fixed null reference in user manager --- MediaBrowser.Server.Implementations/Library/UserManager.cs | 4 +++- MediaBrowser.ServerApplication/ApplicationHost.cs | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/MediaBrowser.Server.Implementations/Library/UserManager.cs index dbb2d7b320..6a162d154e 100644 --- a/MediaBrowser.Server.Implementations/Library/UserManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserManager.cs @@ -106,10 +106,12 @@ namespace MediaBrowser.Server.Implementations.Library /// /// The logger. /// The configuration manager. - public UserManager(ILogger logger, IServerConfigurationManager configurationManager) + /// The user data repository. + public UserManager(ILogger logger, IServerConfigurationManager configurationManager, IUserDataRepository userDataRepository) { _logger = logger; ConfigurationManager = configurationManager; + _userDataRepository = userDataRepository; } #region Events diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index 59395e4698..11a262ef8d 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -220,12 +220,12 @@ namespace MediaBrowser.ServerApplication ZipClient = new DotNetZipClient(); RegisterSingleInstance(ZipClient); - UserManager = new UserManager(Logger, ServerConfigurationManager); - RegisterSingleInstance(UserManager); - UserDataRepository = new SQLiteUserDataRepository(ApplicationPaths, JsonSerializer, LogManager); RegisterSingleInstance(UserDataRepository); + UserManager = new UserManager(Logger, ServerConfigurationManager, UserDataRepository); + RegisterSingleInstance(UserManager); + LibraryManager = new LibraryManager(Logger, TaskManager, UserManager, ServerConfigurationManager, UserDataRepository); RegisterSingleInstance(LibraryManager); From d792fa43598bbe8c442bd74ff28fa4c9a02fa56a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 14 Apr 2013 07:57:22 -0400 Subject: [PATCH 2/2] fixes #139 - 'Undefined' Library --- MediaBrowser.Controller/Entities/BaseItem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 3c60d3a392..a311cca9e4 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -32,7 +32,7 @@ namespace MediaBrowser.Controller.Entities /// Gets or sets the name. /// /// The name. - public string Name { get; set; } + public virtual string Name { get; set; } /// /// Gets or sets the id.