Compare commits

..

No commits in common. "bf39b6c18081ffd8648da1bbc97414bf8a425946" and "976be2f566f0a02a1a41110718853805afc172a7" have entirely different histories.

3 changed files with 11 additions and 34 deletions

View File

@ -111,22 +111,12 @@ class VidmolyUploader {
throw new Error('Vidmoly Login fehlgeschlagen: Falscher Username oder Passwort');
}
// Verify session by fetching a logged-in-only page. Vidmoly redesigned
// the site and changed cookie names, so the old "has cookie 'login' or
// 'xfsts'" heuristic broke. Instead we hit /?op=my_account (or similar)
// and confirm we're not redirected to the login form.
if (this.cookies.size === 0) {
// Check for login cookie
const hasSession = this.cookies.has('login') || this.cookies.has('xfsts') ||
this.cookies.size > 1;
if (!hasSession) {
throw new Error('Vidmoly Login fehlgeschlagen: Keine Session erhalten');
}
const verifyRes = await this._fetch(`${BASE_URL}/?op=my_account`);
const verifyBody = await verifyRes.text();
// A logged-out page shows the login form (name="login" + name="password");
// a logged-in page shows account info ("Logout", "My Account", "My Files").
const looksLoggedIn = /(?:logout|my[_ ]?account|my[_ ]?files)/i.test(verifyBody)
&& !/<form[^>]*>\s*[\s\S]{0,500}?name=["']password["']/i.test(verifyBody);
if (!looksLoggedIn) {
throw new Error('Vidmoly Login fehlgeschlagen: Session konnte nicht verifiziert werden');
}
}
/**

View File

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

View File

@ -1886,19 +1886,8 @@ function handleStats(data) {
// --- Retry ---
async function retrySelectedJobs() {
const retryJobs = [];
// Build a Set for O(1) selectedFiles dedup below.
const existingFilePaths = new Set();
for (const f of selectedFiles) existingFilePaths.add(f.path);
queueJobs.forEach(j => {
if (selectedJobIds.has(j.id) && ['error', 'done', 'aborted', 'skipped'].includes(j.status)) {
// Invalidate the old uploadId: retire the index entry and mark it so
// any late progress event from the previous (cancelled/completed)
// upload can't overwrite the freshly-reset state.
if (j.uploadId) {
_jobIndexByUploadId.delete(j.uploadId);
_deletedJobIds.add(j.uploadId);
}
j.status = uploading ? 'queued' : 'preview';
j.error = null;
j.result = null;
@ -1909,9 +1898,8 @@ async function retrySelectedJobs() {
j.progress = 0;
j.uploadId = null;
retryJobs.push(j);
if (!existingFilePaths.has(j.file)) {
if (!selectedFiles.find(f => f.path === j.file || f.name === j.fileName)) {
selectedFiles.push({ path: j.file, name: j.fileName, size: j.bytesTotal });
existingFilePaths.add(j.file);
}
}
});
@ -2880,15 +2868,14 @@ function setupAccountDragReorder(container) {
async function toggleAccount(accountId) {
const found = findAccountById(accountId);
if (!found) return;
// Flip in place; re-render immediately so the UI responds before the
// disk write completes. The saveConfig is fire-and-forget-ish here because
// we already know the new state locally — a full getConfig round-trip
// after every toggle made rapid enable/disable clicks feel laggy.
found.account.enabled = !found.account.enabled;
found.account.enabled = found.account.enabled === false ? true : false;
await window.api.saveConfig({ hosters: config.hosters });
config = await window.api.getConfig();
syncSelectedUploadHosters();
renderAccounts();
renderHosterSummary();
try { await window.api.saveConfig({ hosters: config.hosters }); } catch {}
renderHosterModal();
renderSettings();
}
async function checkSingleAccount(accountId) {