feat(player): external subtitles via OpenSubtitles

Add an OpenSubtitles client, /api/subtitles routes and useSubtitles to
fetch subtitles by show/episode/filename, wire them as player tracks
alongside embedded ones, and strip hls.js's auto-added tracks. New
OPENSUBTITLES_* / SUBTITLE_LANGUAGES env vars (documented in env.example).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
nerandClaude Opus 4.8 committed 2026-08-08 13:17:12 +03:00
1 parent c695697c4f
commit ecc57ff135
24 files changed
+372 -67

No files matched your search

-2
View File
@@ -9,7 +9,6 @@ const LIST_PAGES = 25;
const PERSON_PAGES = 10;
const BATCH_SIZE = 20;
// Mirrors the discover filters used by the /popular and /top pages (data/queries/popular.ts)
const DISCOVER_FILTERS = {
'vote_count.gte': '300',
'vote_average.gte': '5',
@@ -36,7 +35,6 @@ const fetchEntries = async (path: string, params: Record<string, string>): Promi
return results.map(({ id, title, name }) => ({ id, title: title || name || '' }));
};
// TMDB allows ~50 requests per second, so the task list is drained in small batches
const collectEntries = async (tasks: (() => Promise<Entry[]>)[]) => {
const entries = new Map<number, string>();