Skip to content

feat(subtitles): support VobSub (.sub+.idx) external bitmap subtitles - #952

Closed
TsangAsuna wants to merge 2 commits into
AimesSoft:mainfrom
TsangAsuna:feat/vobsub-subtitle-support
Closed

TsangAsuna wants to merge 2 commits into
AimesSoft:mainfrom
TsangAsuna:feat/vobsub-subtitle-support

Conversation

@TsangAsuna

Copy link
Copy Markdown
Contributor

Summary

  • Add .idx to subtitle extension whitelists (constants, utils, file pickers on desktop/Apple and Android)
  • Sniff MPEG-PS pack header (00 00 01 BA) in .sub so binary VobSub skips text decoding/encoding repair; MicroDVD text unaffected
  • Fix IDX fallback being overwritten by the decode-failure reload path (missing return after IDX attach)
  • Enforce .sub+.idx pairing at every candidate layer: remote lists (dandanplay/WebDAV/SMB x2/shared/managed), local scans, auto-load scoring; orphan .idx is excluded
  • Remote .idx caching now downloads the paired .sub beside it as <hash>.sub (player locates bitmap data by same-name .sub)
  • Binary VobSub skips text-level preprocessing (preloadSubtitleFile sniffs first)

Quality gate

  • flutter analyze --no-fatal-infos --no-fatal-warnings lib: 2010 issues before and after (baseline unchanged, 0 new)
  • flutter test: same 6 pre-existing failures as baseline (unrelated to subtitles)

Test plan

  • flutter analyze lib (baseline unchanged)
  • flutter test (baseline unchanged)
  • On-device: select .sub+.idx pair and confirm bitmap subtitles render
  • dandanplay remote: VobSub pair listed/downloaded/activated

On tablet-like devices during fullscreen playback (hidden control
bar) the media capture dialog disabled barrier dismissal, leaving
the top-right close button as the only way to close it. Pass
barrierDismissible: true unconditionally so tapping outside the
dialog closes it, consistent with other Nipaplay windows.
- Add .idx to subtitle extension whitelists (constants, utils, pickers)
- Sniff MPEG-PS pack header in .sub so binary VobSub skips text decoding
- Fix IDX fallback being overwritten by the decode-failure reload path
- Enforce .sub+.idx pairing at candidate/scan/auto-load layers
- Cache paired .sub beside remote .idx for player bitmap lookup
@TsangAsuna
TsangAsuna requested a review from a team as a code owner September 26, 2026 22:29
@TsangAsuna TsangAsuna closed this Sep 26, 2026
@TsangAsuna
TsangAsuna deleted the feat/vobsub-subtitle-support branch September 26, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant