Commit Graph

769 Commits

Author SHA1 Message Date
Sucukdeluxe
143d0921fc Release v1.7.36 2026-03-07 23:35:17 +01:00
Sucukdeluxe
00d873445c Fix stall-timeout false positives on fully downloaded small archive parts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:34:46 +01:00
Sucukdeluxe
46a64f9e95 Release v1.7.35 2026-03-07 23:15:42 +01:00
Sucukdeluxe
307dcf0815 Fix stop→start race conditions causing potential hang
- Add scheduler generation counter to prevent stale scheduler from
  continuing after stop/start cycle
- Guard processItem stop-abort handler: skip status overwrite when a
  new start() has already re-activated the session
- Yield in start() after recoverRetryableItems to let pending abort
  handlers complete before evaluating item states
- Add test: rapid stop → disable provider → start must resolve

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:15:05 +01:00
Sucukdeluxe
3032604496 Release v1.7.34 2026-03-07 22:33:46 +01:00
Sucukdeluxe
291c80c7fc Fix auto-recovery re-download loop: check archive magic bytes before forcing re-download
Files with valid RAR/7z/ZIP signature are not corrupt (wrong password),
only files with invalid signature get force-redownloaded.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:33:10 +01:00
Sucukdeluxe
3ab7b6c9a3 Release v1.7.33 2026-03-07 22:27:22 +01:00
Sucukdeluxe
556cbd1d85 Fix auto-recovery for CRC-corrupt archives with correct file sizes
- Trust extractor CRC verdict over file size checks
- Re-queue incomplete downloads instead of just warning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:26:49 +01:00
Sucukdeluxe
2a429b49c0 Release v1.7.32 2026-03-07 22:14:24 +01:00
Sucukdeluxe
5c29355e9a Prevent repeated hybrid extraction retries 2026-03-07 22:13:51 +01:00
Sucukdeluxe
960b1fa046 Release v1.7.31 2026-03-07 21:53:49 +01:00
Sucukdeluxe
9bc9c984cb Fix hybrid auto recovery loops 2026-03-07 21:53:10 +01:00
Sucukdeluxe
1222cb08b5 Release v1.7.30 2026-03-07 21:27:42 +01:00
Sucukdeluxe
fb036733e3 Fix auto-recovery for stale archive parts 2026-03-07 21:27:03 +01:00
Sucukdeluxe
a322a16b7b Release v1.7.29 2026-03-07 21:09:28 +01:00
Sucukdeluxe
16bfbfc106 Fix archive underflow and extraction readiness 2026-03-07 21:08:43 +01:00
Sucukdeluxe
0f2e8d5567 Release v1.7.27 2026-03-07 20:34:46 +01:00
Sucukdeluxe
b8bf9c491c Fallback to UnRAR when 7-Zip fails on encrypted RAR archives
If the primary extractor (7-Zip) fails with wrong_password/checksum
error on a .rar file, automatically try the alternative extractor
(UnRAR/WinRAR) which handles RAR format natively and more reliably.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:34:17 +01:00
Sucukdeluxe
ed0070c711 Release v1.7.26 2026-03-07 20:26:10 +01:00
Sucukdeluxe
167c28f945 Show base provider name in status text instead of key details
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:25:32 +01:00
Sucukdeluxe
a3b72d4cbf Release v1.7.25 2026-03-07 20:18:59 +01:00
Sucukdeluxe
934f24ae22 Add shift-click range selection for downloads list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:18:27 +01:00
Sucukdeluxe
c7c6134d48 Release v1.7.24 2026-03-07 20:14:48 +01:00
Sucukdeluxe
24e457d84d Revalidate completed items on startup, fix stale session data
Items incorrectly marked as "completed" by the old 50% recovery threshold
persist in the session file across updates. On startup, check all completed
items: if the file on disk is smaller than expected totalBytes, reset to
"queued" so it gets re-downloaded. Also reset items whose files are missing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:14:11 +01:00
Sucukdeluxe
afef8dae6f Release v1.7.23 2026-03-07 20:10:39 +01:00
Sucukdeluxe
e80948df54 Fix disk-fallback in hybrid extract allowing partial files
Two bugs in findReadyArchiveSets disk-fallback:

1. Failed items were explicitly excluded from the blocking check
   (status !== "failed"), so partial downloads with "failed" status
   would not block extraction. Now ANY non-completed item blocks.

2. The disk size check was only > 10 KB, allowing 627 MB partial
   files of 1001 MB archives to pass. Now requires the file to be
   within one allocation unit of the item's expected totalBytes.

Added findItemByDiskPath helper to look up the owning item for a
file on disk and get its expected size.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:10:04 +01:00
Sucukdeluxe
7d09479b44 Release v1.7.22 2026-03-07 19:48:54 +01:00
Sucukdeluxe
0f2823bdc2 Fix premature hybrid extraction of incomplete archive parts
Item-Recovery incorrectly marked partially downloaded files as "completed"
when the file size was >= 50% of expected size. A 627 MB partial download
of a 1001 MB file (62.7%) would pass the check and trigger hybrid
extraction on incomplete RAR archives.

Fix: require file to be within one allocation unit (4 KB) of the expected
size instead of 50%. Also add a pre-allocation guard: if the file appears
to be at the expected size but downloadedBytes is significantly behind
(< 95%), skip recovery (likely a pre-allocated sparse file from a crash).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:48:22 +01:00
Sucukdeluxe
99074464fb Release v1.7.21 2026-03-07 19:37:07 +01:00
Sucukdeluxe
927ff5c21a Auto-fix legacy (N) suffix filenames on startup
Detect items whose targetPath has a " (N)" suffix from the previous
duplicate filename bug and rename them back to the original filename.
This fixes extraction failures for RAR split archives that were
downloaded with (1) suffix before v1.7.19.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:36:30 +01:00
Sucukdeluxe
135ba8616f Release v1.7.20 2026-03-07 19:34:13 +01:00
Sucukdeluxe
afbd425227 Fix Debrid-Link key selection: always use first available key
Replace shared currentKeyIndex round-robin with sequential scan from
first key. All parallel items now consistently use the same key (e.g.
Key 3) until it hits a quota/error, then all move to Key 4, etc.

Previously, currentKeyIndex was shared across parallel unrestrict calls,
causing items to scatter across keys (3, 5, 7) even when Key 3 still
had capacity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:33:40 +01:00
Sucukdeluxe
fef9ff6318 Release v1.7.19 2026-03-07 19:27:04 +01:00
Sucukdeluxe
0e0c211d35 Restore target path reservations on startup to prevent (1) duplicates
After restart, reservedTargetPaths (in-memory) was empty so claimTargetPath
could not distinguish between "file belongs to this item" and "file belongs
to another item". The naive fix (allow overwrite if unclaimed) would have
risked overwriting completed files from other items.

Proper fix: restore reservedTargetPaths from persisted session data on init.
This way each item's targetPath is correctly claimed, and claimTargetPath
can safely reuse the item's own file while protecting other items' files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:26:29 +01:00
Sucukdeluxe
dadc2d1b57 Release v1.7.18 2026-03-07 19:21:00 +01:00
Sucukdeluxe
cb02dd3aac Fix duplicate (1) filenames after app restart with partial downloads
When the app restarts (or updates) while downloads are in progress,
partial files remain on disk but reservedTargetPaths (in-memory) is empty.
claimTargetPath treated the unclaimed-but-existing file as a conflict and
appended (1) to the filename, breaking RAR split archive extraction.

Fix: if a file exists on disk but no other item has reserved the path,
allow overwriting instead of creating a duplicate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:20:26 +01:00
Sucukdeluxe
31a579f07c Release v1.7.17 2026-03-07 18:03:05 +01:00
Sucukdeluxe
a0800045ec Fix Debrid-Link key rotation: skip broken keys immediately, add cooldown cache
- Add "notDebrid", "disabledServerHost", "notFree" as immediate-skip errors
  (no 3x retry per key, break to next key instantly like quota errors)
- Add per-key cooldown cache (2 min) so parallel items skip recently-failed keys
  instead of all starting at the same broken key
- Set cooldown on quota errors too, preventing repeated checks on exhausted keys

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:02:34 +01:00
Sucukdeluxe
7e0d4e210f Release v1.7.16 2026-03-07 17:56:25 +01:00
Sucukdeluxe
e00c5b5344 Fix shelve mechanism: reset provider + circuit breaker, reduce pause to 90s
Shelve (15+ failures) now mimics manual stop/start behavior:
- Clears item.provider for fresh provider selection on retry
- Resets provider circuit breaker (providerFailures) for the old provider
- Reduces shelve duration from 5 min to 90s since the issue is stale
  provider state, not a timing problem (manual restart works instantly)

Also adds comprehensive session-load logging:
- Logs package/item count on every session file read
- Logs errors when session file parsing fails (was silent before)
- Safety net: if primary session is empty but backup has packages,
  automatically restores from backup
- Logs shutdown save with package/item counts
- Logs DownloadManager init state and cleanup policy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:55:56 +01:00
Sucukdeluxe
0042ce0adb Release v1.7.15 2026-03-07 17:15:15 +01:00
Sucukdeluxe
ccf4dc2e08 Fix hosterNotAvailable skipping provider cooldown in inner catch
The inner unrestrict error handler still called recordProviderFailure()
for hosterNotAvailable errors, causing provider-level cooldown escalation
(up to 180s) even though the issue is hoster-side, not provider-side.
This made auto-retry stall while manual reset worked instantly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:14:38 +01:00
Sucukdeluxe
b02f37cda5 Release v1.7.14 2026-03-07 17:10:07 +01:00
Sucukdeluxe
35975d7333 Fix hosterNotAvailable retry stalling due to provider cooldown
hosterNotAvailable was added to isTemporaryUnrestrictError which
triggered aggressive provider-level cooldowns (up to 180s) that
blocked ALL items for the affected provider. Since items kept
failing, the cooldown never expired (15-min reset threshold never
reached), causing retries to effectively stall.

Fix: remove hosterNotAvailable from isTemporaryUnrestrictError.
It still gets normal unrestrict retry with item-level backoff
(5s -> 120s) via isUnrestrictFailure, but without provider-wide
cooldown blocking other items.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:09:29 +01:00
Sucukdeluxe
8a64289924 Release v1.7.13 2026-03-07 17:02:32 +01:00
Sucukdeluxe
67fc3a8e1c Treat hosterNotAvailable as temporary error with retry
Move hosterNotAvailable from isPermanentLinkError to
isTemporaryUnrestrictError — hoster being unavailable is usually
transient (overload, maintenance) and should be retried with backoff
instead of immediately failing as "Link ungültig".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:01:58 +01:00
Sucukdeluxe
4bdc95a055 Release v1.7.12 2026-03-07 16:45:00 +01:00
Sucukdeluxe
8e4b29a155 Encrypted backup system + hide extracted items in package list
Backup redesign (JDownloader 2 style):
- AES-256-GCM encrypted .mdd format with fixed app key
- All credentials exported (no more ***-masking), works on any PC
- Includes settings, session AND history in backup
- Backward-compatible: auto-detects legacy JSON backups
- Normalize history entries on import
- Added debridLinkApiKeys, linkSnappy credentials to sensitive keys

Hide extracted items:
- New setting: hide completed/extracted items from package item list
- Items still count in progress stats (done/total), only hidden in UI
- Default: enabled
- Toggle in settings: "Entpackte Items in Paketliste ausblenden"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:44:21 +01:00
Sucukdeluxe
0edd8f6be5 Redesign backup system: AES-256-GCM encrypted .mdd format
- Replace plaintext JSON export with encrypted binary format (JDownloader 2 style)
- Fixed app-internal key, works on any machine without password
- Export now includes ALL credentials (no more ***-masking), session AND history
- Add debridLinkApiKeys, linkSnappy credentials to sensitive keys list
- Backward-compatible import: auto-detects legacy JSON backups
- File extension changed from .json to .mdd
- MDD1 magic bytes + random IV + GCM auth tag for integrity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:39:19 +01:00
Sucukdeluxe
ca534196b8 Release v1.7.11 2026-03-07 15:12:08 +01:00