Compare commits
No commits in common. "a1a3e87de83681d04b7aa756601e8bb55f90fab1" and "c7343175ca7909ba9805b0099c590d277dca6d85" have entirely different histories.
a1a3e87de8
...
c7343175ca
13
main.js
13
main.js
@ -661,18 +661,9 @@ ipcMain.handle('start-upload', (_event, payload) => {
|
||||
? buildUploadTasksFromJobs(config, jobs)
|
||||
: buildUploadTasks(config, files, hosters);
|
||||
|
||||
// Identify jobs that were skipped (no account/credentials)
|
||||
const taskJobIds = new Set(tasks.map(t => t.jobId).filter(Boolean));
|
||||
const skippedJobs = jobs.filter(j => j.id && !taskJobIds.has(j.id)).map(j => ({
|
||||
jobId: j.id, hoster: j.hoster, reason: 'Kein gültiger Account für diesen Hoster'
|
||||
}));
|
||||
if (skippedJobs.length > 0) {
|
||||
debugLog(` skipped ${skippedJobs.length} jobs: ${skippedJobs.map(s => s.hoster).join(', ')}`);
|
||||
}
|
||||
|
||||
debugLog(` tasks built: ${tasks.length}`);
|
||||
|
||||
if (tasks.length === 0) return { error: 'Keine gültigen Zugangsdaten für die gewählten Hoster.', skippedJobs };
|
||||
if (tasks.length === 0) return { error: 'Keine gültigen Zugangsdaten für die gewählten Hoster.' };
|
||||
|
||||
// Pass hoster settings to the upload manager
|
||||
uploadManager = new UploadManager(config.hosterSettings || {}, config.globalSettings || {});
|
||||
@ -761,7 +752,7 @@ ipcMain.handle('start-upload', (_event, payload) => {
|
||||
});
|
||||
|
||||
debugLog(`start-upload returning started=true (startBatch deferred to nextTick)`);
|
||||
return { started: true, taskCount: tasks.length, skippedJobs };
|
||||
return { started: true, taskCount: tasks.length };
|
||||
});
|
||||
|
||||
ipcMain.handle('cancel-upload', () => {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "multi-hoster-uploader",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.4",
|
||||
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
@ -1322,7 +1322,6 @@ async function startUpload() {
|
||||
}))
|
||||
};
|
||||
const result = await window.api.startUpload(uploadPayload);
|
||||
_markSkippedJobs(result);
|
||||
persistQueueStateSoon();
|
||||
|
||||
if (result && result.error) {
|
||||
@ -1339,18 +1338,6 @@ async function startUpload() {
|
||||
}
|
||||
}
|
||||
|
||||
function _markSkippedJobs(result) {
|
||||
if (!result || !Array.isArray(result.skippedJobs) || result.skippedJobs.length === 0) return;
|
||||
for (const skipped of result.skippedJobs) {
|
||||
const job = _jobIndexById.get(skipped.jobId);
|
||||
if (job) {
|
||||
job.status = 'error';
|
||||
job.error = skipped.reason || 'Kein gültiger Account';
|
||||
}
|
||||
}
|
||||
renderQueueTable();
|
||||
}
|
||||
|
||||
async function startSelectedUpload() {
|
||||
if (uploading) return;
|
||||
uploading = true; // set immediately to prevent double-click race
|
||||
@ -1386,7 +1373,6 @@ async function startSelectedUpload() {
|
||||
}))
|
||||
};
|
||||
const result = await window.api.startUpload(uploadPayload);
|
||||
_markSkippedJobs(result);
|
||||
persistQueueStateSoon();
|
||||
|
||||
if (result && result.error) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user