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';