feat(bestdebrid): add BestDebrid web-login provider

- New BestDebrid web-login option (BrowserWindow + session.fetch)
- Uses bestdebrid.com/api/v1/generateLink with browser session cookies
- Login via BestDebrid website in embedded browser window
- Toggle "BestDebrid per Web-Login statt API-Token verwenden"
- Provider label shows "BestDebrid (Web)" or "BestDebrid (API)"
- Session persistence respects "Token merken" setting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe
2026-03-06 11:26:48 +01:00
co-authored by Claude Opus 4.6
parent 54e502b9af
commit 438a9f209e
12 changed files with 368 additions and 7 deletions
+4 -2
View File
@@ -38,7 +38,7 @@ function releaseTlsSkip(): void {
}
}
import { cleanupCancelledPackageArtifactsAsync, removeDownloadLinkArtifacts, removeSampleArtifacts } from "./cleanup";
import { AllDebridWebUnrestrictor, DebridService, MegaWebUnrestrictor, RealDebridWebUnrestrictor, checkRapidgatorOnline } from "./debrid";
import { AllDebridWebUnrestrictor, BestDebridWebUnrestrictor, DebridService, MegaWebUnrestrictor, RealDebridWebUnrestrictor, checkRapidgatorOnline } from "./debrid";
import { cleanupArchives, clearExtractResumeState, collectArchiveCleanupTargets, extractPackageArchives, findArchiveCandidates, hasAnyFilesRecursive, removeEmptyDirectoryTree } from "./extractor";
import { validateFileAgainstManifest } from "./integrity";
import { logger } from "./logger";
@@ -159,6 +159,7 @@ type DownloadManagerOptions = {
megaWebUnrestrict?: MegaWebUnrestrictor;
allDebridWebUnrestrict?: AllDebridWebUnrestrictor;
realDebridWebUnrestrict?: RealDebridWebUnrestrictor;
bestDebridWebUnrestrict?: BestDebridWebUnrestrictor;
invalidateMegaSession?: () => void;
onHistoryEntry?: HistoryEntryCallback;
};
@@ -953,7 +954,8 @@ export class DownloadManager extends EventEmitter {
this.debridService = new DebridService(settings, {
megaWebUnrestrict: options.megaWebUnrestrict,
allDebridWebUnrestrict: options.allDebridWebUnrestrict,
realDebridWebUnrestrict: options.realDebridWebUnrestrict
realDebridWebUnrestrict: options.realDebridWebUnrestrict,
bestDebridWebUnrestrict: options.bestDebridWebUnrestrict
});
this.invalidateMegaSessionFn = options.invalidateMegaSession;
this.onHistoryEntryCallback = options.onHistoryEntry;