diff options
| author | Eric Reed <ebr@mediabrowser3.com> | 2013-03-04 09:43:29 -0500 |
|---|---|---|
| committer | Eric Reed <ebr@mediabrowser3.com> | 2013-03-04 09:43:29 -0500 |
| commit | b4ca3a7ad94484fe73262a4de92c554e768ee891 (patch) | |
| tree | 21751cc3170fd1e9fd0974df059411ef4696a732 /MediaBrowser.Controller/Entities/User.cs | |
| parent | 67b20fdf0f970041480b1ea7d08d80b72a394c51 (diff) | |
| parent | d3b9afef2f3895daf91056938a92d6f51c8c834b (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Conflicts:
MediaBrowser.Controller/Providers/FanartBaseProvider.cs
MediaBrowser.Controller/Providers/Music/LastfmArtistProvider.cs
Diffstat (limited to 'MediaBrowser.Controller/Entities/User.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/User.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.cs index bf77cdc95..ef50a0867 100644 --- a/MediaBrowser.Controller/Entities/User.cs +++ b/MediaBrowser.Controller/Entities/User.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Common.Extensions; +using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Configuration; @@ -18,6 +19,7 @@ namespace MediaBrowser.Controller.Entities public class User : BaseItem { internal static IUserManager UserManager { get; set; } + internal static IXmlSerializer XmlSerializer { get; set; } /// <summary> /// The _root folder path @@ -45,7 +47,7 @@ namespace MediaBrowser.Controller.Entities } else { - _rootFolderPath = Kernel.Instance.ApplicationPaths.DefaultUserViewsPath; + _rootFolderPath = ConfigurationManager.ApplicationPaths.DefaultUserViewsPath; } } return _rootFolderPath; @@ -61,7 +63,7 @@ namespace MediaBrowser.Controller.Entities { var safeFolderName = FileSystem.GetValidFilename(username); - return System.IO.Path.Combine(Kernel.Instance.ApplicationPaths.RootFolderPath, safeFolderName); + return System.IO.Path.Combine(ConfigurationManager.ApplicationPaths.RootFolderPath, safeFolderName); } /// <summary> @@ -171,7 +173,7 @@ namespace MediaBrowser.Controller.Entities get { // Lazy load - LazyInitializer.EnsureInitialized(ref _configuration, ref _configurationInitialized, ref _configurationSyncLock, () => (UserConfiguration)Kernel.Instance.GetXmlConfiguration(typeof(UserConfiguration), ConfigurationFilePath)); + LazyInitializer.EnsureInitialized(ref _configuration, ref _configurationInitialized, ref _configurationSyncLock, () => (UserConfiguration)ConfigurationHelper.GetXmlConfiguration(typeof(UserConfiguration), ConfigurationFilePath, XmlSerializer)); return _configuration; } private set @@ -321,7 +323,7 @@ namespace MediaBrowser.Controller.Entities { var safeFolderName = FileSystem.GetValidFilename(username); - return System.IO.Path.Combine(Kernel.Instance.ApplicationPaths.UserConfigurationDirectoryPath, safeFolderName); + return System.IO.Path.Combine(ConfigurationManager.ApplicationPaths.UserConfigurationDirectoryPath, safeFolderName); } /// <summary> @@ -411,7 +413,7 @@ namespace MediaBrowser.Controller.Entities { var userPath = RootFolderPath; - var defaultPath = Kernel.Instance.ApplicationPaths.DefaultUserViewsPath; + var defaultPath = ConfigurationManager.ApplicationPaths.DefaultUserViewsPath; if (userPath.Equals(defaultPath, StringComparison.OrdinalIgnoreCase)) { |
