Compare commits
No commits in common. "c70f105685ad02995a78b0654296f0541fcb5b98" and "65f8d9a0e872284b778101bba271e19ca1a1678c" have entirely different histories.
c70f105685
...
65f8d9a0e8
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "multi-hoster-uploader",
|
"name": "multi-hoster-uploader",
|
||||||
"version": "3.2.1",
|
"version": "3.2.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": {
|
||||||
|
|||||||
@ -563,29 +563,21 @@ function buildPersistedQueueState() {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// After a restart no upload manager is running, so any in-flight state
|
|
||||||
// (queued / getting-server / uploading / retrying / aborted) is
|
|
||||||
// meaningless. Collapse them all to 'preview' so the queue shows a
|
|
||||||
// consistent "Bereit" for everything that didn't actually terminate.
|
|
||||||
// Only true terminal states (done / error / skipped) survive as-is.
|
|
||||||
const TERMINAL = new Set(['done', 'error', 'skipped']);
|
|
||||||
return {
|
return {
|
||||||
selectedUploadHosters: getSelectedHosters(),
|
selectedUploadHosters: getSelectedHosters(),
|
||||||
selectedFiles: Array.from(selectedFileMap.values()),
|
selectedFiles: Array.from(selectedFileMap.values()),
|
||||||
queueJobs: queueJobs.map(job => {
|
queueJobs: queueJobs.map(job => ({
|
||||||
const isTerminal = TERMINAL.has(job.status);
|
id: job.id,
|
||||||
return {
|
file: job.file,
|
||||||
id: job.id,
|
fileName: job.fileName,
|
||||||
file: job.file,
|
hoster: job.hoster,
|
||||||
fileName: job.fileName,
|
// Save aborted jobs as queued so they survive restart
|
||||||
hoster: job.hoster,
|
status: job.status === 'aborted' ? 'queued' : job.status,
|
||||||
status: isTerminal ? job.status : 'preview',
|
bytesTotal: job.bytesTotal || 0,
|
||||||
bytesTotal: job.bytesTotal || 0,
|
error: job.status === 'aborted' ? null : (job.error || null),
|
||||||
error: isTerminal ? (job.error || null) : null,
|
result: job.result || null,
|
||||||
result: isTerminal ? (job.result || null) : null,
|
maxAttempts: job.maxAttempts || 0
|
||||||
maxAttempts: job.maxAttempts || 0
|
}))
|
||||||
};
|
|
||||||
})
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user