Files
SubMiner/backlog/tasks/task-121 - Fix-YouTube-manual-subtitle-selection-regression-when-downloadable-tracks-exist.md

2.6 KiB

id, title, status, assignee, created_date, updated_date, labels, dependencies, references, priority
id title status assignee created_date updated_date labels dependencies references priority
TASK-121 Fix YouTube manual subtitle selection regression when downloadable tracks exist Done
@codex
2026-03-08 05:37 2026-03-08 05:42
bug
youtube
subtitles
/Users/sudacode/projects/japanese/SubMiner/launcher/youtube/manual-subs.ts
/Users/sudacode/projects/japanese/SubMiner/launcher/youtube/orchestrator.ts
https://www.youtube.com/watch?v=MXzQRLmN9hE
high

Description

Ensure launcher YouTube subtitle generation reuses downloadable manual subtitle tracks when the video already has requested languages available, instead of falling back to whisper generation. Reproduce against videos like MXzQRLmN9hE that expose manual en/ja subtitles via yt-dlp.

Acceptance Criteria

  • #1 When requested primary/secondary manual YouTube subtitle tracks exist, planning selects them and schedules no whisper generation for those tracks.
  • #2 Filename normalization handles manual subtitle outputs produced by yt-dlp for language-tagged downloads.
  • #3 Automated tests cover the reproduced manual en/ja selection case.

Implementation Notes

Reproduced against https://www.youtube.com/watch?v=MXzQRLmN9hE with yt-dlp --list-subs: manual zh/en/ja/ko subtitle tracks are available from YouTube.

Adjusted launcher YouTube orchestration so detected manual subtitle tracks suppress whisper generation but are no longer materialized as external subtitle files. SubMiner now relies on the native YouTube/mpv subtitle tracks for those languages.

Added orchestration tests covering the manual-track reuse plan and ran a direct runtime probe against MXzQRLmN9hE. Probe result: primary/secondary native tracks detected, no external subtitle aliases emitted, output directory remained empty.

Verification: bun test launcher/youtube/orchestrator.test.ts launcher/config-domain-parsers.test.ts launcher/mpv.test.ts passed; bun run typecheck passed.

Final Summary

Fixed the YouTube subtitle regression where videos with real downloadable subtitle tracks still ended up with duplicate external subtitle files. Manual subtitle availability now suppresses whisper generation and external subtitle publication, so videos like MXzQRLmN9hE use the native YouTube/mpv subtitle tracks directly. Launcher preprocess logging was also updated to report native subtitle availability instead of misleading missing statuses.