generate blur thumbnail for all items!

This commit is contained in:
2026-05-23 21:05:40 +02:00
parent 8c9e89c771
commit 2f044a8d02
11 changed files with 79 additions and 92 deletions

View File

@@ -130,16 +130,8 @@ export const handleRethumbUpload = async (req, res, itemId) => {
try {
await execFile('magick', [tmpPath, '-coalesce', '-resize', `${thumbSpec}^`, '-gravity', 'center', '-crop', `${thumbSpec}+0+0`, '+repage', finalPath]);
// Check if item contains NSFW or NSFL tag
const tags = await db`
select tag_id from tags_assign
where item_id = ${+item.id}
and tag_id in (2, ${cfg.nsfl_tag_id || 3})
`;
if (tags.length > 0) {
// Generate blurred thumbnail
await queue.genBlurredThumbnail(item.id, !item.active);
}
// Generate blurred thumbnail
await queue.genBlurredThumbnail(item.id, !item.active);
} catch (err) {
console.error('[RETHUMB HANDLER] Magick error:', err);