Stop automatic batches from re-uploading files the hoster rejected
CI / verify (push) Canceled after 0s
CI / verify (push) Canceled after 0s
Automation-triggered starts and auto-retry rounds restarted every job in error state, including files a hoster permanently rejected (e.g. Byse "Not video file format"). Each new file in the watched folder thus re-uploaded the rejected 3-4 GB files again on two Byse accounts. Automatic starts now skip file-rejected jobs; manual starts still retry them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
54a6bcbb6f
commit
134adb0213
1 file changed
+9
-2
+9
-2
@@ -444,6 +444,12 @@ function isStartableQueueJob(job) {
|
||||
return !!job && isStartableQueueStatus(job.status);
|
||||
}
|
||||
|
||||
function isAutomaticallyStartableQueueJob(job) {
|
||||
if (!isStartableQueueJob(job)) 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)
|
||||
@@ -1039,7 +1045,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 });
|
||||
}
|
||||
@@ -4808,7 +4814,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();
|
||||
|
||||
Reference in new issue
Block a user