From d7f9cd510f73b14c905347eb8ce4cce86a02fa09 Mon Sep 17 00:00:00 2001 From: Administrator Date: Sun, 22 Mar 2026 16:34:12 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20upload=20starts=20immediate?= =?UTF-8?q?ly,=20no=20blocking=20health=20check=20alert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the auto health check before upload would block with an alert dialog if any hoster check failed (e.g. "byse.sx: fetch failed"), preventing the upload from starting entirely. Now the upload starts immediately regardless of health check results. The startup account check still runs in the background on app launch. Failed hosters will naturally retry during the actual upload via the existing retry/fallback mechanism in upload-manager. Co-Authored-By: Claude Opus 4.6 (1M context) --- renderer/app.js | 53 ------------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/renderer/app.js b/renderer/app.js index daaa2b1..d23b46d 100644 --- a/renderer/app.js +++ b/renderer/app.js @@ -1292,9 +1292,6 @@ function getSelectedJobLinks() { // --- Upload --- async function startUpload() { if (uploading) return; - // Wait for any running health check to finish (e.g. startup auto-check) - // eslint-disable-next-line no-unmodified-loop-condition -- healthCheckRunning is modified externally between awaits - for (let _hcWait = 0; healthCheckRunning && _hcWait < 300; _hcWait++) await new Promise(r => setTimeout(r, 100)); // max 30s uploading = true; // set immediately to prevent double-click race updateQueueActionButtons(); @@ -1305,30 +1302,6 @@ async function startUpload() { const jobsToStart = queueJobs.filter((job) => job.status === 'preview' || job.status === 'queued'); if (jobsToStart.length === 0) { uploading = false; updateQueueActionButtons(); return; } - // Auto health check — only check hosters that have jobs to start - if (autoHealthCheckEnabled) { - const jobHosters = new Set(jobsToStart.map(j => j.hoster)); - const checkHosters = [...jobHosters].filter(name => name === 'doodstream.com' || name === 'vidmoly.me' || name === 'voe.sx' || name === 'byse.sx'); - if (checkHosters.length > 0) { - healthCheckRunning = true; - try { - const rows = await executeHealthCheck(checkHosters, 'auto'); - const errors = rows.filter(r => r.status === 'error'); - if (errors.length > 0) { - alert(`Auto-Check fehlgeschlagen:\n${errors.map(r => `${r.hoster}: ${r.message}`).join('\n')}\n\nUpload wurde nicht gestartet.`); - uploading = false; updateQueueActionButtons(); - return; - } - } catch (err) { - alert(`Auto-Check fehlgeschlagen: ${err.message}\nUpload wurde nicht gestartet.`); - uploading = false; updateQueueActionButtons(); - return; - } finally { - healthCheckRunning = false; - } - } - } - try { queueJobs.forEach(j => { if (j.status === 'preview') j.status = 'queued'; @@ -1365,8 +1338,6 @@ async function startUpload() { async function startSelectedUpload() { if (uploading) return; - // eslint-disable-next-line no-unmodified-loop-condition -- healthCheckRunning is modified externally between awaits - for (let _hcWait = 0; healthCheckRunning && _hcWait < 300; _hcWait++) await new Promise(r => setTimeout(r, 100)); // max 30s uploading = true; // set immediately to prevent double-click race updateQueueActionButtons(); @@ -1376,30 +1347,6 @@ async function startSelectedUpload() { const jobsToStart = queueJobs.filter((job) => selectedJobIds.has(job.id) && (job.status === 'preview' || job.status === 'queued')); if (jobsToStart.length === 0) { uploading = false; updateQueueActionButtons(); return; } - // Auto health check — only check hosters that have jobs to start - if (autoHealthCheckEnabled) { - const jobHosters = new Set(jobsToStart.map(j => j.hoster)); - const checkHosters = [...jobHosters].filter(name => name === 'doodstream.com' || name === 'vidmoly.me' || name === 'voe.sx' || name === 'byse.sx'); - if (checkHosters.length > 0) { - healthCheckRunning = true; - try { - const rows = await executeHealthCheck(checkHosters, 'auto'); - const errors = rows.filter(r => r.status === 'error'); - if (errors.length > 0) { - alert(`Auto-Check fehlgeschlagen:\n${errors.map(r => `${r.hoster}: ${r.message}`).join('\n')}\n\nUpload wurde nicht gestartet.`); - uploading = false; updateQueueActionButtons(); - return; - } - } catch (err) { - alert(`Auto-Check fehlgeschlagen: ${err.message}\nUpload wurde nicht gestartet.`); - uploading = false; updateQueueActionButtons(); - return; - } finally { - healthCheckRunning = false; - } - } - } - try { jobsToStart.forEach(j => { if (j.status === 'preview') j.status = 'queued';