Replace BrowserWindow-based login flow with Netscape cookie file import
for BestDebrid authentication. Cloudflare Turnstile captcha cannot be
solved in Electron's embedded browser, so users export cookies from
their real browser and import them here.
- Rewrite bestdebrid-web.ts: remove BrowserWindow/CDP code, add
parseNetscapeCookieFile() and importCookiesFromFile()
- Add file picker dialog for .txt cookie files in main IPC handler
- Update IPC channel from OPEN_BESTDEBRID_LOGIN to IMPORT_BESTDEBRID_COOKIES
- Update preload bridge and renderer UI with cookie import button
- Fix pLabel scope in downloadToFile (pass as parameter from processItem)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Detaching the debugger before loadURL removed the registered
anti-fingerprint scripts, causing blank pages. Now keep the
debugger attached through page load and detach on window close.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use Chrome DevTools Protocol to inject scripts before page load that:
- Set navigator.webdriver to false
- Add fake navigator.plugins
- Set navigator.languages to realistic values
- Add window.chrome runtime stub
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cloudflare Turnstile blocks Electron's default user agent. Set a
Chrome user agent on both the session and webContents level so the
login captcha passes correctly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>