The Free Software Media System - Server Backend & API
fixed issue of UserRootFolders never getting persisted
Luke Pulverenti0bc542b19135
diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.csindex 690f976052..954dfb05f1 100644--- a/MediaBrowser.Controller/Entities/User.cs+++ b/MediaBrowser.Controller/Entities/User.cs@@ -125,7 +125,7 @@ namespace MediaBrowser.Controller.Entities{get{- LazyInitializer.EnsureInitialized(ref _rootFolder, ref _userRootFolderInitialized, ref _userRootFolderSyncLock, () => (UserRootFolder)LibraryManager.ResolvePath(RootFolderPath));+ LazyInitializer.EnsureInitialized(ref _rootFolder, ref _userRootFolderInitialized, ref _userRootFolderSyncLock, () => LibraryManager.GetUserRootFolder(RootFolderPath));return _rootFolder;}private set@@ -218,22 +218,6 @@ namespace MediaBrowser.Controller.Entitiesawait RootFolder.ValidateChildren(progress, cancellationToken).ConfigureAwait(false);}- /// <summary>- /// Validates only the collection folders for a User and goes no further- /// </summary>- /// <param name="cancellationToken">The cancellation token.</param>- /// <param name="progress">The progress.</param>- /// <returns>Task.</returns>- public async Task ValidateCollectionFolders(IProgress<double> progress, CancellationToken cancellationToken)- {- Logger.Info("Validating collection folders for {0}", Name);- await RootFolder.RefreshMetadata(cancellationToken).ConfigureAwait(false);-- cancellationToken.ThrowIfCancellationRequested();-- await RootFolder.ValidateChildren(progress, cancellationToken, recursive: false).ConfigureAwait(false);- }-/// <summary>/// Renames the user./// </summary>diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.csindex da2f46abbd..36d39d5304 100644--- a/MediaBrowser.Controller/Library/ILibraryManager.cs+++ b/MediaBrowser.Controller/Library/ILibraryManager.cs@@ -163,5 +163,12 @@ namespace MediaBrowser.Controller.Library/// <param name="item"></param>/// <returns>The proper instance to the item</returns>BaseItem GetOrAddByReferenceItem(BaseItem item);++ /// <summary>+ /// Gets the user root folder.+ /// </summary>+ /// <param name="userRootPath">The user root path.</param>+ /// <returns>UserRootFolder.</returns>+ UserRootFolder GetUserRootFolder(string userRootPath);}}\ No newline at end of file