mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
Merge pull request #5013 from awsr/gallery-fix
Remove incorrect gallery cleanup check
This commit is contained in:
@@ -1117,7 +1117,6 @@ async function thumbCacheCleanup(folder, imgCount, controller, force = false) {
|
||||
const keptGalleryHashes = force ? new Set() : new Set(galleryHashes.values()); // External context should be safe since this function run is guarded by AbortController/AbortSignal in the SimpleFunctionQueue
|
||||
const folderNormalized = folder.replace(/\/+/g, '/').replace(/\/$/, '');
|
||||
const recursiveFolder = IDBKeyRange.bound(folderNormalized, `${folderNormalized}\uffff`, false, true);
|
||||
if (keptGalleryHashes.size < minCleanupCount && !force) return; // Don't run when there aren't many excess entries
|
||||
const cachedHashesCount = await idbCount(recursiveFolder)
|
||||
.catch((e) => {
|
||||
error('maintenanceQueue', { folder, error: e });
|
||||
|
||||
Reference in New Issue
Block a user