aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs
diff options
context:
space:
mode:
authorJean-Pierre Bachmann <info@jean-pierre-bachmann.dev>2023-02-05 21:08:08 +0200
committerJean-Pierre Bachmann <info@jean-pierre-bachmann.dev>2023-02-05 21:08:08 +0200
commit2a4cc4d942828886eb0c10389e602d67155aeca4 (patch)
treeffe351a36aa47f70b7a587d4acbbf7e0195ad84b /Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs
parent0b71974054b4f520fa0ef3ead8f1b688ec2d1d74 (diff)
Updated logging level and formatting
Diffstat (limited to 'Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs')
-rw-r--r--Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs
index e1be43b9b..617fd687a 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/CleanupCollectionPathsTask.cs
@@ -4,7 +4,6 @@ using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using Emby.Server.Implementations.Collections;
using MediaBrowser.Controller.Collections;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies;
@@ -68,30 +67,30 @@ public class CleanupCollectionPathsTask : IScheduledTask
var collectionsFolder = await _collectionManager.GetCollectionsFolder(false).ConfigureAwait(false);
if (collectionsFolder is null)
{
- _logger.LogInformation("There is no collection folder to be found.");
+ _logger.LogDebug("There is no collection folder to be found");
return;
}
var collections = collectionsFolder.Children.OfType<BoxSet>().ToArray();
- _logger.LogTrace("Found {CollectionLength} Boxsets.", collections.Length);
+ _logger.LogTrace("Found {CollectionLength} Boxsets", collections.Length);
for (var index = 0; index < collections.Length; index++)
{
var collection = collections[index];
- _logger.LogTrace("Check Boxset {CollectionName}.", collection.Name);
+ _logger.LogDebug("Check Boxset {CollectionName}", collection.Name);
var itemsToRemove = new List<LinkedChild>();
foreach (var collectionLinkedChild in collection.LinkedChildren.ToArray())
{
if (!File.Exists(collectionLinkedChild.Path))
{
- _logger.LogInformation("Item in boxset {CollectionName} cannot be found at {ItemPath}.", collection.Name, collectionLinkedChild.Path);
+ _logger.LogInformation("Item in boxset {CollectionName} cannot be found at {ItemPath}", collection.Name, collectionLinkedChild.Path);
itemsToRemove.Add(collectionLinkedChild);
}
}
if (itemsToRemove.Any())
{
- _logger.LogTrace("Update Boxset {CollectionName}.", collection.Name);
+ _logger.LogDebug("Update Boxset {CollectionName}", collection.Name);
collection.LinkedChildren = collection.LinkedChildren.Except(itemsToRemove).ToArray();
await collection.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, cancellationToken)
.ConfigureAwait(false);