fixed issue of UserRootFolders never getting persisted

This commit is contained in:
Luke Pulverenti
2013-04-05 00:12:35 -04:00
parent 980620f290
commit 0bc542b191
2 changed files with 8 additions and 17 deletions

View File

@@ -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.Entities
await 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>