From 1b567efeb5f4720f3d64a03359d420f83a3b781c Mon Sep 17 00:00:00 2001 From: gnattu Date: Wed, 17 Apr 2024 21:32:21 +0800 Subject: fix: correctly pass parameters in overrides Signed-off-by: gnattu --- MediaBrowser.Controller/Entities/Folder.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Controller/Entities/Folder.cs') diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 31ba0494a..45c27fdc0 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -274,7 +274,7 @@ namespace MediaBrowser.Controller.Entities /// Task. public Task ValidateChildren(IProgress progress, MetadataRefreshOptions metadataRefreshOptions, bool recursive = true, bool allowRemoveRoot = false, CancellationToken cancellationToken = default) { - return ValidateChildrenInternal(progress, recursive, true, false, metadataRefreshOptions, metadataRefreshOptions.DirectoryService, cancellationToken); + return ValidateChildrenInternal(progress, recursive, true, allowRemoveRoot, metadataRefreshOptions, metadataRefreshOptions.DirectoryService, cancellationToken); } private Dictionary GetActualChildrenDictionary() @@ -416,9 +416,9 @@ namespace MediaBrowser.Controller.Entities validChildren.Add(child); } - var shouldNotRemove = IsRoot && !allowRemoveRoot; + var shouldRemove = !IsRoot || allowRemoveRoot; // If it's an AggregateFolder, don't remove - if (shouldNotRemove && currentChildren.Count != validChildren.Count) + if (shouldRemove && currentChildren.Count != validChildren.Count) { // That's all the new and changed ones - now see if there are any that are missing var itemsRemoved = currentChildren.Values.Except(validChildren).ToList(); -- cgit v1.2.3