Commit Graph

317 Commits

Author SHA1 Message Date
Sucukdeluxe
3287504618 Fix invalid path when package name contains forward slash
sanitizeFilename() is now applied before constructing outputDir and
extractDir, so names like "TMSF/4SF" no longer produce broken Windows paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 00:21:14 +01:00
Sucukdeluxe
dfc5d73105 Fix disk-fallback extraction triggering with incomplete archive parts
When a pending item has neither targetPath nor fileName (e.g. after a
reset before re-unrestrict), it is invisible to pendingItemStatus and
the disk-fallback could incorrectly start extraction with a partial file.
Add a guard that skips disk-fallback for any archive set if the package
contains such an untracked pending item.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 00:03:31 +01:00
Sucukdeluxe
9d374b97cf Fix provider order/routing respecting on restart, schedule timer on manual start
- Clear item.provider on stop/restart so provider order/routing changes
  are respected on next download attempt
- Reset item.provider for all non-completed items when providerOrder or
  hosterRouting changes in settings
- Cancel scheduled-start timer when queue is started manually
- Track disk-fallback hybrid-extract archives per session to prevent
  infinite post-processing loop

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 23:52:09 +01:00
Sucukdeluxe
905b55e7d8 fix: provider fallback on cooldown, hoster routing dirty flag, provider order in DM 2026-03-06 23:06:05 +01:00
Sucukdeluxe
2e6074337a feat: re-download from history, reset-all-failed, scheduled start, fix provider order dirty flag 2026-03-06 22:53:20 +01:00
Sucukdeluxe
716b516900 feat: dynamic provider order, hoster routing, MKV sample fix
- Replace fixed primary/secondary/tertiary slots with unlimited ordered
  providerOrder: DebridProvider[] list; supports as many accounts as needed
- Provider list reorderable via up/down buttons in Accounts settings tab
- Migration: derives order from legacy primary/secondary/tertiary if empty
- Mega-Debrid split into megadebrid-api and megadebrid-web as separate providers
- Add per-hoster routing (hosterRouting) to assign specific debrid provider per hoster
- Fix duplicate MKV files in library: filter out sample files from Sample subfolders
- Remove legacy provider-selection dropdowns from hidden settings section
- Add CSS for provider-order-list/row/num/label/actions classes
- Update debrid tests: add providerOrder: [] to use legacy fallback path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 22:17:44 +01:00
Sucukdeluxe
0003d786d8 Release v1.6.90 2026-03-06 20:43:15 +01:00
Sucukdeluxe
0eb3403e40 Release v1.6.89 2026-03-06 20:19:17 +01:00
Sucukdeluxe
272b43d59e Release v1.6.88 2026-03-06 20:05:53 +01:00
Sucukdeluxe
06e649ba5b fix: skip sample MKVs during library collection
MKV library collection now filters out sample files before moving.
Files in "sample"/"samples" directories and files with "sample" in
their name are excluded. This prevents duplicate "(2)" entries in
the library folder caused by samples having the same base name as
the real episodes (just different casing from the archive).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:33:15 +01:00
Sucukdeluxe
c811649b9d feat: add per-hoster provider routing (Hoster-Zuordnung)
- New settings field hosterRouting maps file hosters to specific debrid providers
- 27 known hosters predefined (Rapidgator, Uploaded, Turbobit, Nitroflare, etc.)
- Custom hoster support via prompt dialog
- Routing takes priority over default provider chain
- Falls back to normal chain on error when autoProviderFallback is enabled
- Logs routing decisions: "Hoster-Zuordnung: rapidgator → Debrid-Link"
- Full UI section in settings with add/remove/change provider per hoster
- Storage validation and normalization for hosterRouting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:14:16 +01:00
Sucukdeluxe
22ed37d67c feat: add LinkSnappy provider, account deactivation, UI polish
- Add LinkSnappy provider with cookie-based session auth and /api/linkgen
- Upgrade LinkSnappy download URLs from http to https (fix 425 errors)
- Add account deactivation toggle (disabledProviders in settings)
- Show account type (API/Web/Login) in provider dropdowns
- Show API key count for Debrid-Link in status label
- Fix all missing German umlauts throughout the UI
- Wider modal for textarea, compact action buttons in one row
- Debrid-Link: log which API key (#1/#2) is used for unrestrict

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:00:19 +01:00
Sucukdeluxe
af188d96c4 feat: add Debrid-Link provider with multi-account key rotation
- New DebridLinkClient with automatic API key rotation on quota errors
  (maxLink, maxLinkHost, maxData, maxDataHost, maxAttempts, maxTransfer)
- Multi-account support: comma or newline-separated API keys
- Full UI integration: account settings, provider dropdowns, summary display
- Safe fallback for undefined debridLinkApiKeys on settings upgrade

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:23:36 +01:00
Sucukdeluxe
fac17497f0 Release v1.6.83 2026-03-06 17:43:26 +01:00
Sucukdeluxe
e92cf59d86 Release v1.6.82 2026-03-06 16:43:49 +01:00
Sucukdeluxe
3cf1bc825e Release v1.6.81 2026-03-06 12:09:39 +01:00
Sucukdeluxe
359fb93be3 Release v1.6.80 2026-03-06 12:04:56 +01:00
Sucukdeluxe
153318274d ♻️ refactor(bestdebrid): switch from browser login to cookie file import
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>
2026-03-06 11:44:23 +01:00
Sucukdeluxe
d6ba5aeae6 🐛 fix(bestdebrid): keep CDP debugger attached until window close
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>
2026-03-06 11:35:45 +01:00
Sucukdeluxe
df02a04cfd 🐛 fix(bestdebrid): inject CDP anti-fingerprint patches for Cloudflare Turnstile
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>
2026-03-06 11:32:28 +01:00
Sucukdeluxe
90c73c4091 🐛 fix(bestdebrid): set user agent on session and webContents level
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>
2026-03-06 11:29:15 +01:00
Sucukdeluxe
438a9f209e 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>
2026-03-06 11:26:48 +01:00
Sucukdeluxe
5873ffa60d 🐛 fix(1fichier): disable CDN downloads to preserve CDN credits
Pass cdn: 0 to 1Fichier get_token API to force direct server
downloads instead of CDN, avoiding unnecessary CDN credit usage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 11:09:13 +01:00
Sucukdeluxe
3950207a0f 🐛 fix: show provider source label (API/Web) in download status text
The running download status (e.g. "Download läuft", "Warte auf
Festplatte") now shows the full provider label including the source
mode, e.g. "Mega-Debrid (API)" instead of just "Mega-Debrid".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 11:01:35 +01:00
Sucukdeluxe
aa4f69795f feat: show (API)/(Web) source labels for all providers
Real-Debrid, AllDebrid, and Mega-Debrid now show their active
mode in logs and UI (e.g. "Real-Debrid (API)" or "Real-Debrid (Web)").

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:58:09 +01:00
Sucukdeluxe
eb5d960e81 🐛 fix(megadebrid): deduplicate parallel connectUser API calls
Multiple parallel downloads calling connectUser simultaneously caused
token invalidation races. Only one connectUser request now runs at a
time; all parallel callers share the same result.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:57:10 +01:00
Sucukdeluxe
faece1cf26 feat(megadebrid): add API mode with toggle and provider labels
- Add Mega-Debrid API support (connectUser + getLink endpoints)
- API mode preferred by default, with automatic web fallback on failure
- User toggle "Mega-Debrid bevorzugt über API" in settings UI
- Provider labels now show source: "Mega-Debrid (API)" or "Mega-Debrid (Web)"
- sourceLabel propagated through all provider result paths
- API session token cached for 20 minutes with auto-invalidation
- Remove megaWebUnrestrict requirement for Mega-Debrid provider config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:51:31 +01:00
Sucukdeluxe
2b322968d9 Add Real-Debrid web-login as alternative to manual API token
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 05:42:34 +01:00
Sucukdeluxe
e4a60a033b Release v1.6.69 2026-03-06 04:17:22 +01:00
Sucukdeluxe
c380abaee2 Fix deferred post-extraction cleanup skipped after hybrid extraction
When hybrid extraction handled all archives, extractedCount stayed 0
causing all cleanup steps (archive deletion, resume state, link/sample
removal, empty dir pruning, auto-rename, nested extraction) to be
bypassed. Extended conditions to also trigger on alreadyMarkedExtracted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:32:11 +01:00
Sucukdeluxe
008f16a05d Add 1Fichier as direct file hoster provider with API key auth
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:59:15 +01:00
Sucukdeluxe
9f62c7c29c Fix hybrid extraction label flicker between Ausstehend and Warten auf Parts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:39:31 +01:00
Sucukdeluxe
3089a45b13 Fix footer hoster count to show number of unique hosters in download list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:35:05 +01:00
Sucukdeluxe
17e7862307 Fix footer showing configured accounts instead of active download hosters
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:31:44 +01:00
Sucukdeluxe
650988c7ac Cleanup: remove leftover empty package folders after extract 2026-03-05 16:27:29 +01:00
Sucukdeluxe
5a5e3d2960 Extractor: cache package passwords and document v1.6.60 2026-03-05 14:49:26 +01:00
Sucukdeluxe
11da8b6e9a Release v1.6.59 2026-03-05 14:31:35 +01:00
Sucukdeluxe
7816dc9488 Fix extraction progress oscillation 2026-03-05 14:20:01 +01:00
Sucukdeluxe
babcd8edb7 Fix extraction completion and password prioritization 2026-03-05 14:11:30 +01:00
Sucukdeluxe
6e00bbab53 Fix JVM daemon restart loop causing 25-30s gaps between extractions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 13:50:32 +01:00
Sucukdeluxe
51a01ea03f Use bulk IInArchive.extract() for ~8x faster extraction, fix archive item resolution
- Replace extractSlow() per-item extraction with IInArchive.extract() bulk API
  in 7-Zip-JBinding. Solid RAR archives no longer re-decode from the beginning
  for each item, bringing extraction speed close to native WinRAR/7z.exe (~375 MB/s
  instead of ~43 MB/s).

- Add BulkExtractCallback implementing both IArchiveExtractCallback and
  ICryptoGetTextPassword for proper password handling during bulk extraction.

- Fix resolveArchiveItemsFromList with multi-level fallback matching:
  1. Pattern match (multipart RAR, split ZIP/7z, generic splits)
  2. Exact filename match (case-insensitive)
  3. Stem-based fuzzy match (handles debrid service filename modifications)
  4. Single-item archive fallback

- Simplify caching from Set+Array workaround back to simple Map<string, T>
  (the original "caching failure" was caused by resolveArchiveItemsFromList
  returning empty arrays, not by Map/Set/Object data structure bugs).

- Add comprehensive tests for archive item resolution (14 test cases)
  and JVM extraction progress callbacks (2 test cases).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 06:24:12 +01:00
Sucukdeluxe
5b221d5bd5 Add persistent JVM daemon for extraction, fix caching with Set+Array
- JVM extractor now supports --daemon mode: starts once, processes
  multiple archives via stdin JSON protocol, eliminating ~5s JVM boot
  per archive
- TypeScript side: daemon manager starts JVM once, sends requests via
  stdin, falls back to spawning new process if daemon is busy
- Fix extraction progress caching: replaced Object.create(null) + in
  operator with Set<string> + linear Array scan — both Map.has() and
  the in operator mysteriously failed to find keys that were just set
- Daemon auto-shutdown on app quit via shutdownDaemon() in before-quit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 05:59:13 +01:00
Sucukdeluxe
7e79bef8da Increase JVM extractor heap to 8GB max / 512MB initial
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 05:48:02 +01:00
Sucukdeluxe
30d216c7ca Fix extraction progress caching and JVM tuning
- Replace Map-based archive item cache with plain Object.create(null)
  to work around mysterious Map.has() returning false despite set()
  being called with the same key — this caused resolveArchiveItems
  to run on every 1.1s pulse instead of being cached, preventing
  extraction progress (Entpacken X%) from ever showing in the UI
- Apply same fix to both hybrid and full extraction paths
- Increase JVM heap from 512MB to 1GB for better extraction throughput
- Use SerialGC for faster JVM startup on short-lived extract processes
- Add download lifecycle logging (package add + item download start)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 05:42:23 +01:00
Sucukdeluxe
d80483adc2 Add download lifecycle logging for better diagnostics
- Log when packages are added (count + names)
- Log when individual item downloads start (filename, size, provider)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 05:32:44 +01:00
Sucukdeluxe
1cda391dfe Fix extraction speed and UI label updates
- Change OS priority from IDLE/BELOW_NORMAL to NORMAL/BELOW_NORMAL so
  extraction runs at full speed (matching manual 7-Zip/WinRAR performance)
- Use "high" priority in both hybrid and full extraction paths
- Increase hybrid extraction threads from hardcoded 2 to dynamic
  calculation (half CPU count, min 2, max 8)
- Fix emitState forced emit being silently dropped when a non-forced
  timer was already pending — forced emits now always replace pending
  timers to ensure immediate UI feedback during extraction transitions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 05:28:42 +01:00
Sucukdeluxe
4ad1c05444 Fix extraction UI labels and speed for final extraction pass
- Force immediate emitState when first resolving archive items so UI
  transitions from 'Ausstehend' to 'Entpacken X%' instantly
- Use BELOW_NORMAL priority (instead of IDLE) for final extraction
  when all downloads are complete — matches manual extraction speed
- Add diagnostic logging for resolveArchiveItems matching

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 05:08:09 +01:00
Sucukdeluxe
c6261aba6a Log when each item download completes
Add "Download fertig: filename (size), pkg=name" log line when an item
finishes downloading, enabling precise timing analysis of when archive
parts become available for extraction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 04:45:17 +01:00
Sucukdeluxe
af6547f254 Add MKV collection after hybrid extraction + detailed timing logs
- Run collectMkvFilesToLibrary in background after each hybrid extraction
  round so MKVs are moved to the library as episodes are extracted, not
  only after the entire package finishes
- Add timing logs to identify bottlenecks:
  - Post-process slot wait time
  - Per-round duration with requeue status
  - Recovery loop duration
  - Setup time in handlePackagePostProcessing
  - findReadyArchiveSets duration when > 200ms

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 04:41:01 +01:00
Sucukdeluxe
1bfde96e46 Self-requeue hybrid extraction to avoid missed archive sets
After a hybrid extraction round completes, set the requeue flag so the
do-while loop immediately checks for more ready archive sets. Previously,
if all items completed before the task started processing, the single
requeue flag was consumed and no new completions triggered re-extraction,
causing 25+ second gaps until the next download completion.

Also change runHybridExtraction return type from void to number
(extracted count) to enable conditional self-requeue only when archives
were actually extracted, preventing infinite requeue loops.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 04:37:03 +01:00