Compare commits

...

2 Commits

Author SHA1 Message Date
Administrator
f6afdad5ba release: v2.5.0 2026-03-22 16:34:35 +01:00
Administrator
d7f9cd510f feat: upload starts immediately, no blocking health check alert
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) <noreply@anthropic.com>
2026-03-22 16:34:12 +01:00
2 changed files with 1 additions and 54 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "multi-hoster-uploader", "name": "multi-hoster-uploader",
"version": "2.4.4", "version": "2.5.0",
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously", "description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {

View File

@ -1292,9 +1292,6 @@ function getSelectedJobLinks() {
// --- Upload --- // --- Upload ---
async function startUpload() { async function startUpload() {
if (uploading) return; 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 uploading = true; // set immediately to prevent double-click race
updateQueueActionButtons(); updateQueueActionButtons();
@ -1305,30 +1302,6 @@ async function startUpload() {
const jobsToStart = queueJobs.filter((job) => job.status === 'preview' || job.status === 'queued'); const jobsToStart = queueJobs.filter((job) => job.status === 'preview' || job.status === 'queued');
if (jobsToStart.length === 0) { uploading = false; updateQueueActionButtons(); return; } 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 { try {
queueJobs.forEach(j => { queueJobs.forEach(j => {
if (j.status === 'preview') j.status = 'queued'; if (j.status === 'preview') j.status = 'queued';
@ -1365,8 +1338,6 @@ async function startUpload() {
async function startSelectedUpload() { async function startSelectedUpload() {
if (uploading) return; 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 uploading = true; // set immediately to prevent double-click race
updateQueueActionButtons(); updateQueueActionButtons();
@ -1376,30 +1347,6 @@ async function startSelectedUpload() {
const jobsToStart = queueJobs.filter((job) => selectedJobIds.has(job.id) && (job.status === 'preview' || job.status === 'queued')); const jobsToStart = queueJobs.filter((job) => selectedJobIds.has(job.id) && (job.status === 'preview' || job.status === 'queued'));
if (jobsToStart.length === 0) { uploading = false; updateQueueActionButtons(); return; } 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 { try {
jobsToStart.forEach(j => { jobsToStart.forEach(j => {
if (j.status === 'preview') j.status = 'queued'; if (j.status === 'preview') j.status = 'queued';