This commit is contained in:
2026-09-13 18:13:12 +02:00
parent 54ee89e63c
commit ffd32a6b63
3 changed files with 81 additions and 42 deletions
+4 -17
View File
@@ -967,9 +967,7 @@ export const handleUpload = async (req, res, self) => {
if (actualMime.startsWith('audio')) {
await moveSafe(path.join(cfg.paths.pending, 'ca', `${itemid}.webp`), coverDest);
}
if (effectiveRating === 'nsfw' || effectiveRating === 'nsfl') {
await moveSafe(path.join(cfg.paths.pending, 't', `${itemid}_blur.webp`), blurDest);
}
await moveSafe(path.join(cfg.paths.pending, 't', `${itemid}_blur.webp`), blurDest);
}
}
@@ -981,13 +979,7 @@ export const handleUpload = async (req, res, self) => {
// EXCEPT for custom thumbnails which are already processed.
const isPending = manualApproval;
try {
// If it's Flash, we might have already processed a custom thumbnail.
// We'll only run genThumbnail if the thumbnail doesn't exist yet.
const tDir = isPending ? path.join(cfg.paths.pending, 't') : cfg.paths.t;
const thumbPath = path.join(tDir, `${itemid}.webp`);
const thumbExists = await fs.access(thumbPath).then(() => true).catch(() => false);
if (!thumbExists) {
if (!thumbProcessed) {
await queue.genThumbnail(filename, actualMime, itemid, '', isPending, 512);
}
@@ -998,13 +990,8 @@ export const handleUpload = async (req, res, self) => {
console.error(`[BACKGROUND ERROR] genThumbnail failed for item ${itemid}:`, err);
}
// Ensure blurred thumbnail exists
const tDir = isPending ? path.join(cfg.paths.pending, 't') : cfg.paths.t;
const blurPath = path.join(tDir, `${itemid}_blur.webp`);
const blurExists = await fs.access(blurPath).then(() => true).catch(() => false);
if (!blurExists) {
await queue.genBlurredThumbnail(itemid, isPending).catch(err => console.error(`[BACKGROUND ERROR] genBlurredThumbnail failed:`, err));
}
// Ensure blurred thumbnail exists and is freshly generated
await queue.genBlurredThumbnail(itemid, isPending).catch(err => console.error(`[BACKGROUND ERROR] genBlurredThumbnail failed:`, err));
// Note: video title metadata is surfaced to the user as a suggestion in the upload form.
// Auto-tagging from embedded metadata was removed — the user must select suggestions explicitly.