fix: code style

Signed-off-by: gnattu <gnattuoc@me.com>
This commit is contained in:
gnattu 2024-04-13 15:02:13 +08:00
parent 4fa6b8874f
commit 7befbda1a6

View File

@ -1047,14 +1047,21 @@ namespace Emby.Server.Implementations.Library
await GetUserRootFolder().RefreshMetadata(cancellationToken).ConfigureAwait(false);
// HACK: override IsRoot here for libraries to be removed
if (removeRoot) GetUserRootFolder().IsRoot = false;
if (removeRoot)
{
GetUserRootFolder().IsRoot = false;
}
await GetUserRootFolder().ValidateChildren(
new Progress<double>(),
new MetadataRefreshOptions(new DirectoryService(_fileSystem)),
recursive: false,
cancellationToken).ConfigureAwait(false);
// HACK: restore IsRoot here after validation
if (removeRoot) GetUserRootFolder().IsRoot = true;
if (removeRoot)
{
GetUserRootFolder().IsRoot = true;
}
// Quickly scan CollectionFolders for changes
foreach (var folder in GetUserRootFolder().Children.OfType<Folder>())