Repository navigation
SubMaker v1.4.52-beta
New Features:
-
SubMaker Database (SMDB) — community subtitle sharing: Introduced a full-featured community subtitle database that lets users upload, browse, download, and translate subtitles linked to specific video streams. SMDB uses a dedicated Redis-backed cache (
SMDBcache type, 2 GB default, LRU eviction, no TTL) with a newsmdbCache.jsmodule for storage and asmdbPageGenerator.jsmodule for the UI page. Key capabilities:- Upload subtitles linked to a video hash with language selection, 2 MB content guard, and override support (max 3 overrides per user per hour).
- Multi-hash subtitle lookup — the subtitle handler queries both the real Stremio hash (
extra.videoHashfrom streaming addons like Torrentio) and the derived per-stream hash, enabling cross-source subtitle matching. Matching SMDB subtitles appear in Stremio's subtitle list asSMDB (<language>)entries. - SRT serving endpoint (
/smdb/:videoHash/:langCode.srt) — serves SMDB subtitles directly to the Stremio player withAccess-Control-Allow-Origin: *. - Full API suite —
GET /api/smdb/list(list subtitles for a hash),GET /api/smdb/download(download subtitle content),POST /api/smdb/upload(upload with override/rate-limit support). - SMDB page (
/smdb) — standalone HTML page generated bysmdbPageGenerator.js, accessible from all QuickNav links across all tool pages. - Stremio addon redirect —
/addon/:config/smdb/:videoIdredirects to the standalone SMDB page with config, videoId, and filename preserved. - Security middleware updated to allow SMDB routes (
/smdb,/api/smdb/*) through CORS and origin checks.
-
Redis Pub/Sub for cross-instance stream activity: On multi-pod deployments (e.g. ElfHosted), stream activity events are now broadcast via Redis Pub/Sub so the SMDB page can detect linked streams from any instance. Each instance gets a unique
INSTANCE_ID; published events includeconfigHashand full stream entry. Remote events update the local LRU cache and notify local SSE listeners. Uses a dedicated subscriber connection (redisClient.duplicate()) as required by ioredis. Graceful shutdown unsubscribes and disconnects. Filesystem deployments are unaffected (pub/sub is a no-op). -
Stremio hash propagation for cross-source matching: The subtitle handler now extracts the real OpenSubtitles-style video hash from
extra.videoHash(provided by streaming addons like Torrentio) and passes it asstremioHashthrough the stream activity system. This hash is persisted alongside the derived per-stream hash, propagated through heartbeats and gap-filling logic, and included in change detection — enabling SMDB to match subtitles across different sources for the same video.
User Interface:
-
Sub Toolbox page overhaul: The hero section is now split into a styled hero-content card (with its own background, border, and border-radius) and a separate
hero-rightcolumn containing the tool shelf. The hero card background gradient was moved from the outer.herogrid to the inner.hero-contentfor sharper visual separation. Padding, gaps, and margins throughout the hero and tool tiles were tightened for a more compact layout. -
"SubMaker Database" button added to Toolbox hero: A new shimmer-animated SMDB CTA button (📪 SubMaker Database) is placed between "Translation History" and the Configure button. Fully styled for light, dark, and true-dark themes with gradient backgrounds, hover lift/glow animations, and a subtle shimmer sweep.
-
"Translation History" button renamed and styled: The "Translation Status" button was renamed to "Translation History" (📣 icon added) with updated text-transform, font-size, and letter-spacing to match the new SMDB button.
-
Configure button replaced with emoji: The "Configure" text button in the Toolbox hero was replaced with a compact 🛠️ emoji-only button.
-
Navbar button sizes reduced ~35%: All QuickNav buttons across all pages were made more compact — padding, gap, font-size, icon sizes, pill sizes, border-radius, box-shadow, and the refresh button dimensions were all scaled down by roughly 35%. Mobile breakpoint retains full-size buttons for touch targets.
-
"Database" link added to QuickNav: A new 📪 Database link appears in the QuickNav bar between "Auto subs" and "History" on all tool pages (Toolbox, File Upload, Sync, Embedded Subs, Auto Subs, History, and SMDB). The SMDB link is wired into
buildToolLinks()in every page generator. -
Configure button moved after History in QuickNav: The 🛠️ Configure link now appears after the History link instead of before it, matching the new button order in the Toolbox hero.
-
SMDB section on Toolbox page: An SMDB hint section with a dashed-border callout and styled SMDB button was added to the toolbox, with full theme support (light/dark/true-dark).
Bug Fixes:
- Fixed missing SMDB directory mapping in FilesystemStorageAdapter: The
SMDBcache type was defined inStorageAdapter.CACHE_TYPESbut had no corresponding directory mapping inFilesystemStorageAdapter, causing storage errors on filesystem deployments. Addedpath.join(this.baseDir, 'smdb')mapping.
Localization:
- Updated
toolbox.hero.bodytext across all 5 locales (en, es, ar, pt-br, pt-pt) to "Enjoy SubMaker's Toolbox!". - Added
toolbox.hero.smdbHintkey across all 5 locales for the SMDB upload/translate hint. - Renamed
toolbox.hero.primaryfrom "Translation Status" to "Translation History" across all 5 locales.
Infrastructure:
StorageFactory.getRedisClient()helper: New static method onStorageFactorythat returns the underlying ioredis client (ornullfor filesystem deployments), used by the pub/sub initialization.RedisStorageAdapter.getClient()method: Exposes the initialized ioredis client for creating duplicate connections (needed for Redis Pub/Sub subscriber).