Compare commits

..

No commits in common. "ad9299e74c4d98bcc9309758144ad6e42b8eabac" and "3c84679df1f367afe8525accdf79e13c835afccc" have entirely different histories.

2 changed files with 3 additions and 9 deletions

View File

@ -136,7 +136,6 @@ class UploadManager extends EventEmitter {
const batchId = `batch-${Date.now()}`;
const results = new Map(); // filePath -> { name, size, results: [] }
this._batchResults = results;
this._additionalPromises = []; // Track jobs added mid-batch via addJobs()
for (const task of tasks) {
const fileName = path.basename(task.file);
@ -151,11 +150,6 @@ class UploadManager extends EventEmitter {
const promises = tasks.map((task) => this._runJob(task, results, signal));
await Promise.allSettled(promises);
// Wait for any jobs added mid-batch via addJobs()
while (this._additionalPromises.length > 0) {
const batch = this._additionalPromises.splice(0);
await Promise.allSettled(batch);
}
this._stopStatsTimer();
this.running = false;
@ -709,9 +703,9 @@ class UploadManager extends EventEmitter {
results.set(task.file, { name: fileName, size, results: [] });
}
}
// Start each new job and track promises so batch-done waits for them
// Start each new job — they'll acquire semaphores and run
for (const task of tasks) {
this._additionalPromises.push(this._runJob(task, results, signal));
this._runJob(task, results, signal);
}
}

View File

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