Fix immediate automation pause, restored queue rendering and bounded disk reads; release 2.1.75
CI / verify (push) Canceled after 0s

This commit is contained in:
Sucukdeluxe committed 2026-10-20 13:56:04 +02:00
1 parent 267a840853
commit 80eb878f1b
12 files changed
+168 -68

No files matched your search

+24 -10
View File
@@ -1166,7 +1166,7 @@ function renderAutomationStatusSnapshot(snapshot) {
const pauseNotice = document.getElementById('automationPauseNotice');
if (pauseNotice) {
pauseNotice.hidden = !snapshot.paused;
pauseNotice.textContent = snapshot.paused ? `${localizeUiText('Automatik pausiert seit')} ${formatAutomationDateTime(snapshot.pausedAt)}. ${localizeUiText('Fortsetzen aktiviert die Ordnerüberwachung und die Warteschlange. Aktive Uploads werden beim Pausieren noch abgeschlossen.')}` : '';
pauseNotice.textContent = snapshot.paused ? `${localizeUiText('Automatik pausiert seit')} ${formatAutomationDateTime(snapshot.pausedAt)}. ${localizeUiText('Laufende Uploads werden sofort abgebrochen. Beim Fortsetzen starten diese Dateien von vorn; abgeschlossene Uploads bleiben erhalten.')}` : '';
}
return snapshot;
}
@@ -1200,7 +1200,7 @@ function syncAutomationPauseResumeButton(snapshot) {
if (settingsButton) {
settingsButton.textContent = localized;
settingsButton.disabled = automationPauseResumeBusy || snapshot.statusAvailable !== true;
settingsButton.title = localizeUiText('Fortsetzen aktiviert die Ordnerüberwachung und die Warteschlange. Aktive Uploads werden beim Pausieren noch abgeschlossen.');
settingsButton.title = localizeUiText('Laufende Uploads werden sofort abgebrochen. Beim Fortsetzen starten diese Dateien von vorn; abgeschlossene Uploads bleiben erhalten.');
}
}
@@ -1384,6 +1384,25 @@ async function runAutomationTestOverlay() {
}
}
let automationJobResumePromise = null;
async function resumeAutomationPausedJobs(guard) {
if (automationJobResumePromise) return automationJobResumePromise;
const operation = (async () => {
if (guard) await guard();
const jobs = queueJobs.filter(job => job.automationPaused === true && (
job.status === 'queued' || (job.status === 'aborted' && job.error === 'Warteschlange angehalten')
));
if (!jobs.length) return { started: false };
return startSelectedUpload(jobs, guard ? { guard } : undefined);
})();
automationJobResumePromise = operation;
try { return await operation; }
finally { if (automationJobResumePromise === operation) automationJobResumePromise = null; }
}
window.resumeAutomationPausedJobs = resumeAutomationPausedJobs;
async function toggleAutomationPauseResume() {
if (automationPauseResumeBusy) return;
const snapshot = createAutomationStatusSnapshot();
@@ -1402,14 +1421,7 @@ async function toggleAutomationPauseResume() {
if (result?.error) throw new Error(result.error);
applyAutomationRuntimeStatus({ ...result, paused: resume ? false : true });
if (resume) {
const resumableJobs = queueJobs.filter(job => job.automationPaused === true && (
job.status === 'queued'
|| (job.status === 'aborted' && job.error === 'Warteschlange angehalten')
));
if (resumableJobs.length > 0) {
if (uploading) await startSelectedUpload(resumableJobs);
else await startSelectedUpload(resumableJobs);
}
await resumeAutomationPausedJobs();
} else {
for (const job of queueJobs) {
if (pausingJobIds.has(job.id) && ['queued', 'getting-server', 'uploading', 'retrying'].includes(job.status)) {
@@ -2777,6 +2789,8 @@ function updateUploadView(options = {}) {
queueActions.style.display = 'flex';
if (options.rebuildPreview !== false && !uploading && selectedFiles.length > 0) {
buildQueuePreview();
} else {
renderQueueTable();
}
}
updateQueueActionButtons();
+2 -1
View File
@@ -410,7 +410,7 @@
['Upload-Log konnte nicht gelesen werden', 'Upload log could not be read'],
['Abschlussnachweis konnte nicht gelesen werden', 'Completion records could not be read'],
['Fehlerdetails enthalten geschützte Daten.', 'Error details contain protected data.'],
['Fortsetzen aktiviert die Ordnerüberwachung und die Warteschlange. Aktive Uploads werden beim Pausieren noch abgeschlossen.', 'Resuming enables folder monitoring and the queue. Active uploads are allowed to finish when pausing.'],
['Laufende Uploads werden sofort abgebrochen. Beim Fortsetzen starten diese Dateien von vorn; abgeschlossene Uploads bleiben erhalten.', 'Active uploads are aborted immediately. On resume, these files restart from the beginning; completed uploads are kept.'],
['Automatik und Warteschlange pausiert. Fortsetzen ist unter Einstellungen → Automatik jederzeit möglich.', 'Automation and queue paused. Resume at any time under Settings → Automation.'],
['Die Tageszähler zählen Prüfungen und Aufnahmen. Wiederholte Abgleiche derselben Datei werden erneut gezählt.', 'Daily counters count checks and admissions. Repeated checks of the same file are counted again.'],
['Bereits hochgeladen laut Abschlussnachweis', 'Already uploaded according to completion records'],
@@ -764,6 +764,7 @@
['Ungültige URL (muss mit http(s):// beginnen)', 'Invalid URL (must start with http(s)://)'],
['Backup-Datei ist zu groß oder ungültig', 'The backup file is too large or invalid'],
['Ungültiges Backup-Format', 'Invalid backup format'],
['Ungültiges Lese-Limit.', 'Invalid read concurrency limit.'],
['Keine gültige .mhu Backup-Datei', 'Not a valid .mhu backup file'],
['Falsches Passwort oder beschädigte Datei', 'Incorrect password or damaged file'],
['Dieses Backup wurde mit einem Passwort verschlüsselt', 'This backup was encrypted with a password'],
+1
View File
@@ -21,6 +21,7 @@
const handlers = {
state: async () => ({ source: 'live', stale: false, uploading, queueCount: queueJobs.length, selectedFileCount: selectedFiles.length, selectedHosters: getSelectedHosters(), counts: queueJobs.reduce((out, job) => { out[job.status] = (out[job.status] || 0) + 1; return out; }, {}) }),
refresh,
'automation-resume': (_args, guard) => window.resumeAutomationPausedJobs(guard),
'update-park': async () => {
cancelStartupQueueAutoStart();
_cancelAutoRetry(true);