real-debrid-downloader/tests
Sucukdeluxe d62fa548cb Debrid-Link: per-(key, host) cooldown for maxLinkHost / maxDataHost
Previously, when a Debrid-Link key returned maxDataHost or maxLinkHost
("you've used up YOUR per-host quota for this hoster on this key"), the
WHOLE key got a 2-min key-wide cooldown — blocking it for all hosters
even though it was only exhausted for that one host.

Now those errors apply a per-(key, host) cooldown instead:
- Key 1 hits maxDataHost on rapidgator → only (Key 1, rapidgator) is
  blocked. Key 1 stays usable for uploaded.net etc. in the same rotation
- Same key + same host on subsequent attempts: skipped with explicit
  "Host-Cooldown rapidgator bis HH:MM:SS" log line
- Key-wide quotas (maxLink, maxData) still apply key-wide as before

Implementation:
- DEBRID_LINK_QUOTA_ERRORS split into key-wide vs host-only sets
- New debridLinkKeyHostCooldowns map keyed by `${keyId}|${hoster}`
- setDebridLinkKeyHostCooldownState mirrors max-wins / strong-category
  semantics of the per-key version, falls back to key-wide cooldown when
  the hoster can't be parsed (safer than thrashing)
- Key runtime status stays "ready" on host-only failures — only this
  (key, host) is blocked, the key is still healthy for other hosters
- Reset/prune helpers (resetDebridLinkRuntimeStateForTests,
  pruneDebridLinkRuntimeStateForKeys, pruneExpiredDebridLinkRuntimeState)
  clear the new map too
- New rotation log event SKIP_HOST_COOLDOWN

Test: 2 keys, key1 hits maxDataHost on rapidgator → key2 succeeds.
Second rapidgator request: key1 SKIPPED via host-cooldown.
Third request to uploaded.net: key1 tried again and succeeds.
2026-04-19 23:41:07 +02:00
..
app-order.test.ts Release v1.6.18 2026-03-04 17:31:20 +01:00
audit-log.test.ts Harden support logging and debug setup 2026-03-09 02:47:49 +01:00
auto-rename.test.ts Auto-rename safety net: never strip valid SxxExx episode token 2026-04-14 11:45:41 +02:00
backup-crypto.test.ts Refactor: Extractor in 18 Sektionen reorganisiert 2026-03-10 23:47:02 +01:00
bestdebrid-web.test.ts Release v1.6.81 2026-03-06 12:09:39 +01:00
cleanup.test.ts Refactor: Extractor in 18 Sektionen reorganisiert 2026-03-10 23:47:02 +01:00
container.test.ts Release v1.4.35 with 413 handling for both dcrypt endpoints 2026-03-01 02:00:52 +01:00
debrid.test.ts Debrid-Link: per-(key, host) cooldown for maxLinkHost / maxDataHost 2026-04-19 23:41:07 +02:00
debug-server.test.ts Fix Debrid-Link retry recovery 2026-03-10 18:20:19 +01:00
download-manager.test.ts Bonus dir detection: normalize separators (Making.Of, Behind.The.Scenes) 2026-04-14 15:03:02 +02:00
extractor-jvm.test.ts Use bulk IInArchive.extract() for ~8x faster extraction, fix archive item resolution 2026-03-05 06:24:12 +01:00
extractor.test.ts Fix parallel extraction false positives 2026-03-10 19:34:42 +01:00
integrity.test.ts Release v1.4.27 with bug audit hardening fixes 2026-02-28 14:12:16 +01:00
item-log.test.ts Harden download integrity, extraction safety, and update security 2026-03-28 16:27:21 +01:00
link-export.test.ts Add app runtime statistics 2026-03-09 04:59:00 +01:00
link-parser.test.ts Add package and item link export 2026-03-09 04:11:18 +01:00
mega-web-fallback.test.ts Comprehensive bugfix release v1.6.45 2026-03-05 03:53:28 +01:00
package-log.test.ts Harden download integrity, extraction safety, and update security 2026-03-28 16:27:21 +01:00
package-order.test.ts Add daily traffic limits, auto-sort packages, Debrid-Link multi-key improvements 2026-03-07 02:29:48 +01:00
realdebrid-web.test.ts Fix Real-Debrid web login session reuse 2026-03-09 00:03:05 +01:00
realdebrid.test.ts Release v1.4.27 with bug audit hardening fixes 2026-02-28 14:12:16 +01:00
rename-log.test.ts Add dedicated rename support logging 2026-03-09 04:48:58 +01:00
resolve-archive-items.test.ts Use bulk IInArchive.extract() for ~8x faster extraction, fix archive item resolution 2026-03-05 06:24:12 +01:00
self-check.ts Comprehensive bugfix release v1.6.45 2026-03-05 03:53:28 +01:00
session-log.test.ts Comprehensive bugfix release v1.6.45 2026-03-05 03:53:28 +01:00
storage.test.ts Harden download integrity, extraction safety, and update security 2026-03-28 16:27:21 +01:00
trace-log.test.ts Harden support logging and debug setup 2026-03-09 02:47:49 +01:00
update.test.ts Harden download integrity, extraction safety, and update security 2026-03-28 16:27:21 +01:00
utils.test.ts Add package and item link export 2026-03-09 04:11:18 +01:00