Merge uploader 2.1.87 fixes into statistics development branch
This commit is contained in:
commit
ff62172778
26 files changed
+407
-103
No files matched your search
+10
-2
@@ -445,6 +445,13 @@ function isStartableQueueJob(job) {
|
||||
return !!job && isStartableQueueStatus(job.status);
|
||||
}
|
||||
|
||||
function isAutomaticallyStartableQueueJob(job) {
|
||||
if (!isStartableQueueJob(job)) return false;
|
||||
if (window.SourceCleanupPolicy?.isStagedSourceFile(job.file || job.fileName)) return false;
|
||||
if (job.status !== 'error' || !window.Stats) return true;
|
||||
return window.Stats.classifyErrorCategory(job.error) !== 'file-rejected';
|
||||
}
|
||||
|
||||
// Queue state
|
||||
let queueJobs = []; // { id, file, fileName, hoster, status, bytesUploaded, bytesTotal, speedKbs, elapsed, remaining, error, result, attempt, maxAttempts, link }
|
||||
const _jobIndexById = new Map(); // id -> job (O(1) lookup)
|
||||
@@ -1040,7 +1047,7 @@ async function applyAutomationEvaluation(evaluation) {
|
||||
renderQueueTable();
|
||||
persistQueueStateSoon(true);
|
||||
} else if (action === 'start') {
|
||||
const result = await startUpload();
|
||||
const result = await startUpload({ _automationStart: true });
|
||||
if (result?.ok === false) {
|
||||
return freezeAutomationValue({ ok: false, error: result.error, warning: null, admittedFiles: [], deferredFiles, paused: /pausiert/i.test(result.error), dryRun: false });
|
||||
}
|
||||
@@ -4810,7 +4817,8 @@ async function startUpload(opts) {
|
||||
buildQueuePreview();
|
||||
}
|
||||
|
||||
const jobsToStart = queueJobs.filter((job) => isStartableQueueStatus(job.status));
|
||||
const automaticStart = !!(opts && (opts._autoRetry || opts._automationStart));
|
||||
const jobsToStart = queueJobs.filter(automaticStart ? isAutomaticallyStartableQueueJob : isStartableQueueJob);
|
||||
if (jobsToStart.length === 0) {
|
||||
uploading = false;
|
||||
updateQueueActionButtons();
|
||||
|
||||
@@ -79,6 +79,8 @@
|
||||
['Geprüfte Updates ohne erneute Bestätigung installieren. Uploads abschließen und danach fortsetzen. Keine Portable-Versionen.', 'Install verified updates without another confirmation. Finish uploads and resume afterwards. No portable versions.'],
|
||||
['Zugangsdaten auslesen', 'Reveal credentials'],
|
||||
['Gespeicherte Zugangsdaten ausdrücklich freigeben. Zusätzliche lokale Bestätigung erforderlich.', 'Explicitly allow saved credentials to be read. Additional local confirmation required.'],
|
||||
['Vollzugriff ohne Bestätigung', 'Full access without confirmation'],
|
||||
['Alle Aktionen ohne lokale Bestätigung ausführen, auch Löschen, Wiederholen mit Quelldatei-Löschung, Ordnerfreigaben und Zugangsdaten.', 'Run every action without local confirmation, including deletions, retries with source deletion, directory grants and credentials.'],
|
||||
['Ordnerfreigaben', 'Directory access'],
|
||||
['Keine Ordner freigegeben.', 'No directories granted.'],
|
||||
['Zugang verwalten', 'Manage access'],
|
||||
@@ -106,6 +108,7 @@
|
||||
['Letzter Kontakt', 'Last contact'],
|
||||
['Ausstehende Widerrufe', 'Pending revocations'],
|
||||
['Der Verbindungscode ist ein Zugangsschlüssel. Er wird weder im Backup gespeichert noch auf andere Installationen übertragen. Löschungen und andere gefährliche Aktionen verlangen eine lokale Bestätigung.', 'The connection code is a credential. It is not stored in backups or transferred to other installations. Deletions and other dangerous actions require local confirmation.'],
|
||||
['Der Verbindungscode ist ein Zugangsschlüssel. Er wird weder im Backup gespeichert noch auf andere Installationen übertragen. Löschungen und andere gefährliche Aktionen verlangen eine lokale Bestätigung, außer bei Vollzugriff.', 'The connection code is a credential. It is not stored in backups or transferred to other installations. Deletions and other dangerous actions require local confirmation unless full access is granted.'],
|
||||
['Ordner freigeben', 'Grant directory'],
|
||||
['Schreibzugriff', 'Write access'],
|
||||
['MCP-Aktion fehlgeschlagen. Verbindung und lokale Berechtigungen prüfen.', 'MCP action failed. Check connection and local permissions.'],
|
||||
@@ -1031,6 +1034,7 @@
|
||||
[/^Clouddrop: Datei nicht lesbar: (.+)$/, 'Clouddrop: File cannot be read: $1'],
|
||||
[/^Doodstream: konnte Upload-Server nicht ermitteln \(Endpoint geändert\?\)\. (.+)$/, 'Doodstream: Could not determine the upload server (endpoint changed?). $1'],
|
||||
[/^Doodstream Upload fehlgeschlagen: (.+)$/, 'Doodstream upload failed: $1'],
|
||||
[/^DoodStream: Upload-Seite antwortete mit HTTP (\d{3})$/, 'DoodStream: The upload page responded with HTTP $1'],
|
||||
[/^Doodstream Upload: kein Filecode — Server gab leeren Link zurück (.+)$/, 'Doodstream upload: No file code — the server returned an empty link $1'],
|
||||
[/^Doodstream lehnt Datei ab \(Server-Status: (.+)\)\. CDN=(.+)$/, 'Doodstream rejected the file (server status: $1). CDN=$2'],
|
||||
[/^Doodstream Upload: Redirect-Antwort ungültig \((.+)\)$/, 'Doodstream upload: Invalid redirect response ($1)'],
|
||||
|
||||
+4
-3
@@ -222,8 +222,9 @@
|
||||
['control','App steuern','Control app','Uploads und Konten verwalten. Kritische Aktionen lokal bestätigen.','Manage uploads and accounts. Confirm critical actions locally.'],
|
||||
['files','Freigegebene Ordner','Granted directories','Auf ausgewählte Ordner zugreifen. Dateiinhalte separat freigeben.','Access selected directories. Allow file contents separately.'],
|
||||
['updates','App-Updates installieren','Install app updates','Geprüfte Updates ohne erneute Bestätigung installieren. Uploads abschließen und danach fortsetzen. Keine Portable-Versionen.','Install verified updates without another confirmation. Finish uploads and resume afterwards. No portable versions.'],
|
||||
['secrets','Zugangsdaten auslesen','Reveal credentials','Gespeicherte Zugangsdaten ausdrücklich freigeben. Zusätzliche lokale Bestätigung erforderlich.','Explicitly allow saved credentials to be read. Additional local confirmation required.']
|
||||
].map(([value,de,en,description,englishDescription])=>`<label class="mcp-permission${value === 'secrets' ? ' mcp-permission-sensitive' : ''}" data-settings-search-entry data-settings-search-label="${de}"><input type="checkbox" value="${value}"${value === 'updates' ? ' data-mcp-updates' : ''} disabled><span><strong>${text(de,en)}</strong><span class="mcp-permission-description">${text(description,englishDescription)}</span></span></label>`).join('')}</fieldset>
|
||||
['secrets','Zugangsdaten auslesen','Reveal credentials','Gespeicherte Zugangsdaten ausdrücklich freigeben. Zusätzliche lokale Bestätigung erforderlich.','Explicitly allow saved credentials to be read. Additional local confirmation required.'],
|
||||
['full_access','Vollzugriff ohne Bestätigung','Full access without confirmation','Alle Aktionen ohne lokale Bestätigung ausführen, auch Löschen, Wiederholen mit Quelldatei-Löschung, Ordnerfreigaben und Zugangsdaten.','Run every action without local confirmation, including deletions, retries with source deletion, directory grants and credentials.']
|
||||
].map(([value,de,en,description,englishDescription])=>`<label class="mcp-permission${['secrets', 'full_access'].includes(value) ? ' mcp-permission-sensitive' : ''}" data-settings-search-entry data-settings-search-label="${de}"><input type="checkbox" value="${value}"${value === 'updates' ? ' data-mcp-updates' : ''} disabled><span><strong>${text(de,en)}</strong><span class="mcp-permission-description">${text(description,englishDescription)}</span></span></label>`).join('')}</fieldset>
|
||||
<div class="mcp-save-row"><p data-mcp-save-state role="status">${text('Erst speichern und aktivieren, dann den Verbindungscode kopieren.', 'Save and enable first, then copy the connection code.')}</p><button type="button" class="btn btn-sm btn-primary" data-mcp-action="enable" disabled>${text('Speichern und aktivieren','Save and enable')}</button></div>
|
||||
</section>
|
||||
<section class="mcp-card" aria-labelledby="mcpGrantsTitle">
|
||||
@@ -233,7 +234,7 @@
|
||||
</section>
|
||||
<section class="mcp-card" aria-labelledby="mcpAccessTitle">
|
||||
<div class="mcp-card-heading"><h4 id="mcpAccessTitle">${text('Zugang verwalten', 'Manage access')}</h4></div>
|
||||
<p>${text('Der Verbindungscode ist ein Zugangsschlüssel. Er wird weder im Backup gespeichert noch auf andere Installationen übertragen. Löschungen und andere gefährliche Aktionen verlangen eine lokale Bestätigung.', 'The connection code is a credential. It is not stored in backups or transferred to other installations. Deletions and other dangerous actions require local confirmation.')}</p>
|
||||
<p>${text('Der Verbindungscode ist ein Zugangsschlüssel. Er wird weder im Backup gespeichert noch auf andere Installationen übertragen. Löschungen und andere gefährliche Aktionen verlangen eine lokale Bestätigung, außer bei Vollzugriff.', 'The connection code is a credential. It is not stored in backups or transferred to other installations. Deletions and other dangerous actions require local confirmation unless full access is granted.')}</p>
|
||||
<p>${text('Zugang erneuern macht den bisherigen Code ungültig. Deaktivieren beendet den Fernzugriff und widerruft den Zugang.', 'Rotating access invalidates the previous code. Disabling remote access revokes access.')}</p>
|
||||
<div class="mcp-actions"><button type="button" class="btn btn-sm btn-secondary" data-mcp-action="rotate" disabled>${text('Zugang erneuern','Rotate access')}</button><button type="button" class="btn btn-sm btn-secondary" data-mcp-action="disable" disabled>${text('Deaktivieren und widerrufen','Disable and revoke')}</button></div>
|
||||
</section>
|
||||
|
||||
Reference in new issue
Block a user