github xtremexq/StremioSubMaker v1.4.34
SubMaker v1.4.34-beta

latest releases: v1.4.97, v1.4.96, v1.4.95...
9 months ago

Bug Fixes:

  • Fixed Wyzie Subs downloads not working: The downloadSubtitle function had an incorrect signature that expected a number but received an options object. This caused the download loop to never execute, resulting in "failed to load external subtitle" errors for all Wyzie Subs. Fixed by updating the function signature to match other providers.

  • Fixed Stremio Community/libmpv request spam: Resolved an issue where Stremio Community clients using libmpv would generate excessive requests when opening the subtitle menu. The root cause was the addon returning 202 Accepted with a Retry-After: 3 header for duplicate translation requests, which caused libmpv to poll every 3 seconds indefinitely. The fix removes the retry header and returns a normal response, stopping the polling loop.

  • Fixed SubSource API key validation endpoint: The /api/validate-subsource endpoint was not passing API key headers when making requests, causing 401/403 authentication failures even with valid keys. Added the required headers to the validation request.

  • Disabled session fingerprint validation: Fingerprint validation was causing false positives and incorrectly deleting valid sessions when the config schema changed (e.g., new fields added, encrypted values differing after decrypt cycle). Token validation is sufficient to detect cross-session contamination. Fingerprint mismatches are now logged at debug level for diagnostics only - sessions are no longer deleted on mismatch.

  • Fixed prefetch cooldown not working: The prefetch cooldown mechanism for Stremio Community V5 clients was not blocking libmpv prefetch requests as intended. The root cause was a key mismatch: the cooldown was being set using the session token (e.g., d20c...6e87) from req.params.config, but was being checked using a computed config hash (e.g., 0f966b7b17ad091e) from ensureConfigHash(). Since these keys never matched, the cooldown check always returned "not blocked." Fixed by using the session token consistently for both setting and checking the cooldown.

Performance:

  • Debounced session TTL refresh writes to Redis: Previously, every single request (manifest, subtitle search, download, etc.) would trigger a Redis SET to refresh the session TTL. With thousands of users, this created massive Redis write overhead. Now TTL refreshes are debounced to once per hour per session, reducing Redis writes by ~99% while maintaining sliding window session expiry.

Improvements:

  • Improved Stremio Community detection: Enhanced detection to also identify libmpv requests (the player that does prefetching) when they have no origin header. This improves the accuracy of the prefetch cooldown system for Stremio Community clients.

  • Enhanced session persistence diagnostics: Added debug logging throughout the session lifecycle to help diagnose disappearing sessions. This includes verification that sessions are written to Redis, logging of fingerprint values on mismatch, and tracing of successful session loads.

  • Removed automatic Android mobile mode: Mobile mode is now only enabled when explicitly configured via mobileMode=true in the config or forced via query string. Automatic detection based on Android user-agent has been removed for consistency across all devices.

New Features:

  • Translation Burst Detection: Added detection for when Stremio/libmpv prefetches ALL translation URLs simultaneously (common with Stremio Community). When 3+ translation requests arrive within 1 second from the same user, only the first request proceeds - the rest receive a "loading" message. This prevents starting multiple expensive AI translations during prefetch. Configurable via:

    • TRANSLATION_BURST_WINDOW_MS (default: 1000ms)
    • TRANSLATION_BURST_THRESHOLD (default: 3 requests)
    • DISABLE_TRANSLATION_BURST_DETECTION=true to disable
  • Download Burst Detection: Added detection for when Stremio prefetches all subtitle download URLs at once. When 5+ download requests (cache misses) arrive within 500ms, only the first proceeds - the rest are deferred to save provider API quota. Configurable via:

    • DOWNLOAD_BURST_WINDOW_MS (default: 500ms)
    • DOWNLOAD_BURST_THRESHOLD (default: 5 requests)
    • DISABLE_DOWNLOAD_BURST_DETECTION=true to disable
  • Stremio Community Prefetch Cooldown: Added targeted blocking for Stremio Community's aggressive libmpv prefetching behavior. When the addon serves a subtitle list to a Stremio Community client (detected via origin=zarg or user-agent=StremioShell), a 2.5 second cooldown is set for that user's config hash. During the cooldown, libmpv prefetch requests to /subtitle/ and /translate/ routes are blocked with a "Click again to load" message. Non-libmpv requests (user actually selecting a subtitle) are allowed through. Official Stremio apps are unaffected since the cooldown is only set for Stremio Community requests. Configurable via:

    • STREMIO_COMMUNITY_COOLDOWN_MS (default: 2500ms)
    • DISABLE_STREMIO_COMMUNITY_COOLDOWN=true to disable
  • Disable Download Cache Option: Added DISABLE_DOWNLOAD_CACHE=true environment variable to completely disable the in-memory download cache if needed.

Don't miss a new StremioSubMaker release

NewReleases is sending notifications on new releases.