mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
suggestions from review
This commit is contained in:
parent
0f60ec3013
commit
cc82ca189f
@ -74,11 +74,12 @@ public class CleanupCollectionPathsTask : IScheduledTask
|
|||||||
var collections = collectionsFolder.Children.OfType<BoxSet>().ToArray();
|
var collections = collectionsFolder.Children.OfType<BoxSet>().ToArray();
|
||||||
_logger.LogDebug("Found {CollectionLength} Boxsets", collections.Length);
|
_logger.LogDebug("Found {CollectionLength} Boxsets", collections.Length);
|
||||||
|
|
||||||
|
var itemsToRemove = new List<LinkedChild>();
|
||||||
for (var index = 0; index < collections.Length; index++)
|
for (var index = 0; index < collections.Length; index++)
|
||||||
{
|
{
|
||||||
var collection = collections[index];
|
var collection = collections[index];
|
||||||
_logger.LogDebug("Check Boxset {CollectionName}", collection.Name);
|
_logger.LogDebug("Check Boxset {CollectionName}", collection.Name);
|
||||||
var itemsToRemove = new List<LinkedChild>();
|
|
||||||
foreach (var collectionLinkedChild in collection.LinkedChildren)
|
foreach (var collectionLinkedChild in collection.LinkedChildren)
|
||||||
{
|
{
|
||||||
if (!File.Exists(collectionLinkedChild.Path))
|
if (!File.Exists(collectionLinkedChild.Path))
|
||||||
@ -102,6 +103,8 @@ public class CleanupCollectionPathsTask : IScheduledTask
|
|||||||
ForceSave = true
|
ForceSave = true
|
||||||
},
|
},
|
||||||
RefreshPriority.High);
|
RefreshPriority.High);
|
||||||
|
|
||||||
|
itemsToRemove.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
progress.Report(100D / collections.Length * (index + 1));
|
progress.Report(100D / collections.Length * (index + 1));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user