diff --git a/js/worker.js b/js/worker.js index 92c1eb9b..9b52c883 100644 --- a/js/worker.js +++ b/js/worker.js @@ -3625,17 +3625,20 @@ async function convertAndOrganiseFiles(threadLimit) { failureReasons.push(result.reason); // Collect the reason for the failure } }); - + const attempted = successfulConversions + failedConversions; // Create a summary message - let summaryMessage = `Processing complete: ${successfulConversions} successful, ${failedConversions} failed.`; - - if (failedConversions > 0) { - summaryMessage += `
Failed conversion reasons:
`; - } + let summaryMessage; + + if (attempted) { + summaryMessage = `Processing complete: ${successfulConversions} successful, ${failedConversions} failed.`; + if (failedConversions > 0) { + summaryMessage += `
Failed conversion reasons:
`; + } + } else { summaryMessage = 'Library is up to date. Nothing to do'} // Post the summary message UI.postMessage({