update dependencies (#2780)

* update messaging

* update dependencies
This commit is contained in:
Jason Dove
2026-01-16 13:57:25 -06:00
committed by GitHub
parent 35d24ffea6
commit 7f361d1ea9
14 changed files with 55 additions and 47 deletions
@@ -1,8 +1,10 @@
using System.IO.Abstractions;
using System.Globalization;
using System.IO.Abstractions;
using ErsatzTV.Core;
using ErsatzTV.Core.Interfaces.Repositories;
using ErsatzTV.Infrastructure.Data;
using ErsatzTV.Infrastructure.Images;
using Humanizer;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
@@ -93,6 +95,7 @@ public class DeleteOrphanedArtworkHandler(
logger.LogDebug("Loaded {Count} artwork hashes (valid file names)", validFiles.Count);
var deleted = 0;
long bytes = 0;
foreach (string file in fileSystem.Directory.EnumerateFiles(
FileSystemLayout.ArtworkCacheFolder,
"*.*",
@@ -103,6 +106,8 @@ public class DeleteOrphanedArtworkHandler(
{
try
{
bytes += fileSystem.FileInfo.New(file).Length;
fileSystem.File.Delete(file);
deleted++;
}
@@ -113,7 +118,10 @@ public class DeleteOrphanedArtworkHandler(
}
}
logger.LogDebug("Deleted {Count} unused artwork cache files", deleted);
logger.LogDebug(
"Deleted {Count} unused artwork cache files totaling {Size}",
deleted,
bytes.Bytes().Humanize(CultureInfo.CurrentCulture));
DeleteEmptySubfolders(FileSystemLayout.ArtworkCacheFolder);
}