aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2023-06-27 21:19:15 -0600
committerCody Robibero <cody@robibe.ro>2023-06-27 21:19:15 -0600
commitcc82ca189fcbd068c34c0d1c38a67d2332a96d44 (patch)
treee7add77a942400f9cc303bf9e241533ecdb77935 /Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs
parent0f60ec3013a4b1c776513fd92dc3829897b78db7 (diff)
suggestions from review
Diffstat (limited to 'Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs')
-rw-r--r--Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs
index f8b044d46..f78fc6f97 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs
@@ -74,11 +74,12 @@ public class CleanupCollectionPathsTask : IScheduledTask
var collections = collectionsFolder.Children.OfType<BoxSet>().ToArray();
_logger.LogDebug("Found {CollectionLength} Boxsets", collections.Length);
+ var itemsToRemove = new List<LinkedChild>();
for (var index = 0; index < collections.Length; index++)
{
var collection = collections[index];
_logger.LogDebug("Check Boxset {CollectionName}", collection.Name);
- var itemsToRemove = new List<LinkedChild>();
+
foreach (var collectionLinkedChild in collection.LinkedChildren)
{
if (!File.Exists(collectionLinkedChild.Path))
@@ -102,6 +103,8 @@ public class CleanupCollectionPathsTask : IScheduledTask
ForceSave = true
},
RefreshPriority.High);
+
+ itemsToRemove.Clear();
}
progress.Report(100D / collections.Length * (index + 1));