diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/LibraryManager.cs | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index 0ebd1aace..124bb396e 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -219,11 +219,7 @@ namespace MediaBrowser.Server.Implementations.Library /// <summary> /// The _root folder sync lock /// </summary> - private object _rootFolderSyncLock = new object(); - /// <summary> - /// The _root folder initialized - /// </summary> - private bool _rootFolderInitialized; + private readonly object _rootFolderSyncLock = new object(); /// <summary> /// Gets the root folder. /// </summary> @@ -232,17 +228,17 @@ namespace MediaBrowser.Server.Implementations.Library { get { - LazyInitializer.EnsureInitialized(ref _rootFolder, ref _rootFolderInitialized, ref _rootFolderSyncLock, CreateRootFolder); - return _rootFolder; - } - private set - { - _rootFolder = value; - - if (value == null) + if (_rootFolder == null) { - _rootFolderInitialized = false; + lock (_rootFolderSyncLock) + { + if (_rootFolder == null) + { + _rootFolder = CreateRootFolder(); + } + } } + return _rootFolder; } } @@ -849,11 +845,6 @@ namespace MediaBrowser.Server.Implementations.Library { get { - if (ConfigurationManager.Configuration.StoreArtistsInMetadata) - { - return Path.Combine(ConfigurationManager.ApplicationPaths.InternalMetadataPath, "artists"); - } - return Path.Combine(ConfigurationManager.ApplicationPaths.ItemsByNamePath, "artists"); } } |
