Show incremental caption search updates in plugin

This commit is contained in:
Sleeps
2026-10-07 14:28:29 +01:00
parent d7e05ab898
commit 7e8d8648bb
@@ -393,7 +393,8 @@
detail.textContent =
(status.model || '') +
(status.route ? ', ' + status.route : '') +
', ' + (status.failed || 0) + ' failed.';
', ' + (status.failed || 0) + ' failed, search updated: ' +
(status.meili_documents_updated || 0) + '.';
}
} else if (status.stage === 'failed') {
button.disabled = false;
@@ -411,7 +412,15 @@
'Captioning complete: ' + (status.frames_completed || 0) +
' saved, ' + (status.failed || 0) + ' failed.';
detail.textContent =
(status.retained || 0) + ' existing captions retained.';
(status.retained || 0) + ' existing captions retained, ' +
(status.meili_documents_updated || 0) + ' search documents updated' +
((status.meili_sync_pending || 0)
? ', ' + status.meili_sync_pending + ' search updates still pending'
: '') +
(status.meili_sync_error
? ' · last search sync error: ' + status.meili_sync_error
: '') +
'.';
} else if (status.stage === 'stopped') {
button.disabled = false;
button.querySelector('span').textContent = 'Start / resume captioning';
@@ -419,8 +428,12 @@
forceCheckbox.disabled = false;
container.textContent = 'Captioning stopped.';
detail.textContent =
(status.frames_completed || 0) +
' captions saved. Start / resume continues the remaining frames; search updates after a later completed run.';
(status.frames_completed || 0) + ' captions saved, ' +
(status.meili_documents_updated || 0) + ' search documents updated' +
((status.meili_sync_pending || 0)
? ', ' + status.meili_sync_pending + ' search updates still pending'
: '') +
'. Start / resume continues the remaining frames.';
} else {
button.disabled = false;
button.querySelector('span').textContent = 'Start / resume captioning';