fixed issue of UserRootFolders never getting persisted

pull/702/head
Luke Pulverenti 11 years ago
parent 980620f290
commit 0bc542b191

@ -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>

@ -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);
}
}
Loading…
Cancel
Save