From 7f6db1a387aa6ade878189fb895347091e96d5d5 Mon Sep 17 00:00:00 2001 From: Momentry Studio Date: Sun, 18 Oct 2026 23:21:28 +0800 Subject: [PATCH] debug: add console.log to re-scan flow - Added logging to ctxReprocess, doReprocess - Log API call and response for debugging - Check if reprocessing flag is blocking the action --- src/views/LibraryView.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/views/LibraryView.vue b/src/views/LibraryView.vue index 9ab7659..3b1bd46 100644 --- a/src/views/LibraryView.vue +++ b/src/views/LibraryView.vue @@ -2196,13 +2196,15 @@ async function waitForStable(condition: () => boolean | Promise, timeou async function ctxReprocess(f: any) { closeContextMenu() - if (reprocessing.value) return + if (reprocessing.value) { console.error('[ctxReprocess] already reprocessing'); return } + console.log('[ctxReprocess] opening confirm dialog for:', f.file_uuid) confirmTarget.value = { mode: 'reprocess', file: f } confirmDialog.value = true } async function doReprocess(f: any) { - if (reprocessing.value) return + console.log('[doReprocess] called for:', f?.file_uuid, f?.file_name) + if (reprocessing.value) { console.error('[doReprocess] already reprocessing'); return } if (!f.isRegistered) { actionMsg.value = 'File not registered'; return } reprocessing.value = true @@ -2210,9 +2212,12 @@ async function doReprocess(f: any) { if (!file) { actionMsg.value = 'File not found in cache' reprocessing.value = false + console.error('[doReprocess] file not found in cache') return } + console.log('[doReprocess] found file, status:', file.status) + const oldStatus = file.status try { @@ -2220,10 +2225,12 @@ async function doReprocess(f: any) { fileStatusCache.value[file.file_uuid] = 'preparing' actionMsg.value = '🔍 Starting deep scan...' + console.log('[doReprocess] calling re_scan_file API for:', file.file_uuid) const result = await apiCall('re_scan_file', { fileUuid: file.file_uuid, autoPipeline: true }) + console.log('[doReprocess] API response:', JSON.stringify(result)) if (result.success) { file.status = 'scanning'