github xtremexq/StremioSubMaker v1.4.72
SubMaker v1.4.72

latest releases: v1.4.98, v1.4.97, v1.4.96...
8 months ago

New Features:

  • Added 3 new Wyzie subtitle sources (Kitsunekko, Jimaku, YIFY): The Wyzie API added 3 new subtitle providers — Kitsunekko (anime subtitles), Jimaku (Japanese anime subtitles), and YIFY (movie subtitles) — bringing the total from 6 to 9 available sources. Added the new providers across the full config stack: backend allSources array in wyzieSubs.js, config defaults and migration/backwards-compatibility fallback in config.js, form population and collection logic in config.js, new checkboxes in the main settings page (main.html) and Quick Setup wizard (quick-setup.html), and state defaults/reading/restore in quick-setup.js. New sources default to disabled for new users; existing Wyzie users who had sources enabled get the new providers auto-enabled via the migration fallback. All 3 providers use the same Wyzie API response format — no backend logic changes were needed.

  • "ASS/SSA Passthrough" setting exposed to all users: The convertAssToVtt toggle was previously hidden. It is now always visible in the Settings section for all users, since ASS passthrough is production-ready with the new translation pipeline. Removed display:none from main.html, and removed devMode gating in config.js (toggleConvertAssToVttGroup() function and config-load visibility).

  • ASS/SSA subtitles: ASS/SSA subtitles can now be fetched and translated while preserving their original format — styles, fonts, colors, positioning tags ({\an8}, {\pos()}, {\b1}, etc.), and document structure ([Script Info], [V4+ Styles], [Events]). Previously, all ASS/SSA subtitles were unconditionally converted to SRT before translation. The new pipeline uses a wrapper approach: (1) parse ASS dialogue entries, separating override tags from translatable text, (2) build a temporary SRT from the extracted clean text, (3) translate via the existing TranslationEngine (unchanged), (4) re-inject translated text back into the original ASS structure with tags restored at proportionally-mapped positions. New assTranslationHelper.js utility (~280 lines) with parseASSForTranslation(), buildSRTFromASSDialogue(), and reassembleASS() functions. Modified subtitles.js to pass skipAssConversion to all 14 provider download calls in both pre-flight and main translation paths, detect ASS format via content inspection ([Script Info] + [V4+ Styles]), conditionally bypass ensureSRTForTranslation(), and reassemble ASS after translation completes. Added _ass cache key variant in cacheKeys.js to prevent format collisions between ASS and SRT translations in the permanent (shared) cache. Updated index.js translation route to detect payload format via detectSubtitlePayloadFormat() and serve correct Content-Type (text/x-ssa) and file extension (.ass/.ssa) in all 3 response paths (bypass cache, permanent cache, main response). Learn Mode compatibility preserved: translated ASS content is converted to SRT via ensureSRTForTranslation() before srtPairToWebVTT() pairing.

  • ASS/SSA format-aware subtitle file selection in archives: findSubtitleFile in archiveExtractor.js now respects the ASS passthrough setting when selecting subtitle files from archives. When skipAssConversion is enabled, the function prioritizes ASS/SSA files over SRT files (using a primaryFiles/secondaryFiles abstraction) for both season-pack episode matching (anime + TV patterns) and single-file selection. Previously, the function always searched SRT files first regardless of passthrough setting — ASS files were only found via the all-entries fallback, which worked by accident but would select an SRT file over an ASS file when both existed in the same archive.

  • Automatic URL extension enforcement for ASS passthrough: When ASS passthrough is enabled (convertAssToVtt: false), the addon now automatically forces urlExtensionTest to 'none' (no file extension in subtitle URLs). Previously, subtitle URLs were built with a .srt extension by default, causing an extension/payload mismatch when the actual content was ASS/SSA — Stremio would request a .srt URL but receive ASS content. The enforcement is applied in three places: backend config normalization (src/utils/config.js), frontend collectConfig() (public/config.js), and the existing URL builder in the subtitle handler (subtitles.js:2860-2862) already handles the 'none' value correctly by setting both urlExtension and translationUrlExtension to empty strings. The serving route at index.js detects the payload format dynamically and sets the correct Content-Type header (text/x-ssa; charset=utf-8) regardless of URL extension.

PS: Partial delivery during translation remains SRT (from the translation engine), with final ASS reassembly applied only to the completed output. Activated by unchecking "Convert ASS/SSA to VTT" in settings — when disabled and the source is ASS/SSA, the translation pipeline automatically uses the new ASS-aware path.

Bug Fixes:

  • Fixed phantom "New stream detected" notifications for streams watched hours/days ago: The stream activity LRU cache had updateAgeOnGet: true, which reset the 6-hour TTL on every SSE connect, heartbeat, or page refresh — old entries essentially never expired as long as a toolbox tab was open. When opening a new toolbox/SMDB page, subscribe() would immediately send the cached entry as an episode event, triggering a toast for a stream that was watched days ago. Removed updateAgeOnGet so entries actually expire after 6 hours. Added a firstSeenAt timestamp to stream activity entries (preserved across heartbeat/enrichment updates) so clients can distinguish "stream started 3 hours ago" from "entry refreshed 10 seconds ago." Added a 30-minute age check (configurable via STREAM_ACTIVITY_SNAPSHOT_MAX_AGE_MS) in subscribe() that suppresses stale cached entries from being sent to new SSE subscribers. Added a matching client-side staleness guard in quickNav.js that checks firstSeenAt against window.__SUBMAKER_PAGE_LOAD_TIME before showing a toast, catching stale data from the polling fallback path that bypasses the server-side SSE check.

  • Fixed ghost linked streams with non-matching hashes on the same title: When Stremio sent multiple subtitle requests for the same videoId with slightly different filenames (different stream sources, URL encoding differences, different addons), deriveVideoHash() produced different MD5 hashes, and the merge logic in recordStreamActivity() allowed the hash to flip — triggering a "new stream" notification for what was really the same stream with a mangled hash. Strengthened the hash drift guard: when the previous entry already has an authoritative filename+hash pair for the same videoId, the incoming hash is rejected regardless of whether the incoming payload has a filename or not. Additionally, notifications now only fire when the videoId actually changes — field enrichment for the same videoId (e.g., empty hash → real hash) is stored silently without broadcasting. The SMDB page's handleStreamLinked() also gained a duplicate-videoId guard and uses firstSeenAt for its staleness check. The _handleRemoteStreamEvent Redis pub/sub handler now applies the same change-detection guards instead of blindly setting LRU entries and notifying listeners.

  • Fixed Google Translate failing on larger subtitle files: The GoogleTranslateProvider.callTranslate() method used axios.get() with params, placing the entire joined subtitle text into the URL query string. Google's endpoint returns HTTP 400 (Bad Request) when the URL-encoded payload exceeds ~15K characters, which commonly happens with batches of 300+ subtitle entries. Switched callTranslate() from GET to POST with application/x-www-form-urlencoded body, eliminating the URL length ceiling entirely. Additionally, added internal chunking (chunkTexts() + _translateChunked()) that splits large payloads into ~6K-character chunks at entry boundaries when the joined text exceeds MAX_CHARS_PER_REQUEST. Each chunk is translated in a separate sequential API call and results are reassembled in correct order. A graceful fallback (_isPayloadTooLargeError()) detects 400/413/414 status codes and automatically switches from single-request to chunked mode, providing resilience even if Google changes their exact limit. All changes are self-contained in googleTranslate.js — no modifications needed to the TranslationEngine or handler code. The fix applies regardless of whether Google Translate is configured as the main or secondary/fallback provider, since all code paths call GoogleTranslateProvider.translateSubtitle().

xSync Extension:

  • OPFS-based stream download for large files (fixes "Array buffer allocation failed"): The xSync extension previously pre-allocated a single Uint8Array(totalBytes) in RAM when downloading full streams in Complete mode — any file exceeding the browser's ~2-4 GB memory ceiling would crash with "Array buffer allocation failed." Added a new fetchFullStreamBufferOPFS() function that streams download chunks directly to the Origin Private File System (OPFS) via FileSystemWritableFileStream, avoiding the upfront memory allocation entirely. After download completes, the file is read back as an ArrayBuffer using the browser's memory-mapped file I/O (significantly more efficient than pre-allocating a contiguous buffer). A fetchFullStream() dispatcher reads the user's preferred mode and delegates to either the OPFS or legacy RAM path. If OPFS is unavailable (e.g. older browser), it silently falls back to RAM. All 5 call sites across embedded-subs extraction (extractEmbeddedSubtitles), autosync audio extraction (extractAudioFromStream — 3 sites), and Assembly AI autosubs (handleAssemblyAutoSubRequest) now route through the dispatcher. Return shape is unchanged ({ buffer, totalBytes, contentType }), so all downstream consumers (FFmpeg offscreen page, subtitle extraction, audio decoding) work without modification.

  • Stream Buffer Mode setting: Added a new "Stream Buffer Mode" dropdown to the xSync options page (General → Global Behaviour section) with two options: Disk (default) — uses OPFS, safe for large files; RAM — legacy in-memory path, faster but may crash on files >2 GB. The setting is stored in chrome.storage.sync under xsync-settings and read by the background service worker before each full-stream download. Default is Disk for safety.

  • Fixed FFmpeg subtitle extraction silently doing nothing (bare core no-op): The offscreen FFmpeg bare core's run() function checked for module.exec then module.callMain to invoke FFmpeg, but ffmpeg-core.js exports neither symbol. The fallthrough ?: 0 silently returned success without ever executing FFmpeg, causing all subtitle extractions via the bare core path to report "No subtitle streams found" regardless of whether the file contained subtitles. Combined with forceBareCore = true (which bypassed the working ffmpeg.wasm wrapper), the offscreen demux path was completely broken. Fixed by setting forceBareCore = false to restore the ffmpeg.wasm wrapper path, and replaced the silent fallthrough with an explicit throw so a missing entry point is immediately surfaced as an error. Applied the same safety fix to background.full.js.

Don't miss a new StremioSubMaker release

NewReleases is sending notifications on new releases.