Skip to content

fix(build): skip-unsupported-streams no longer drops text subtitles#98

Merged
ScottMorris merged 1 commit into
mainfrom
fix/issue-93-skip-unsupported-strips-text-subs
Jun 25, 2026
Merged

fix(build): skip-unsupported-streams no longer drops text subtitles#98
ScottMorris merged 1 commit into
mainfrom
fix/issue-93-skip-unsupported-strips-text-subs

Conversation

@ScottMorris

Copy link
Copy Markdown
Contributor

Summary

strip_unsupported_subtitle_mappings was retaining only SubtitleType::Bitmap streams, silently stripping every SRT/ASS/WebVTT subtitle track even though Spindle has a fully-working RenderTextSubtitles pipeline for them.

The filter now retains everything except SubtitleType::Unknown — codecs ffprobe identified but Spindle has no handler for. Bitmap passthrough and text rendering are both kept.

  • Rename helper to strip_unknown_codec_subtitle_mappings to reflect the narrower scope
  • Replace the now-inverted planner test with two regression tests: text subtitles survive the escape hatch; unknown-codec tracks are still stripped

Closes #93.

Test plan

  • cargo test -p tauri-plugin-spindle-project (213/213 passing)
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --check

)

`strip_unsupported_subtitle_mappings` was retaining only
`SubtitleType::Bitmap` streams, which silently stripped every
text-based subtitle track (SRT/ASS/WebVTT) even though Spindle has a
fully-working `RenderTextSubtitles` pipeline for them.

The filter now retains everything except `SubtitleType::Unknown` —
codecs ffprobe identified but Spindle has no handler for. Bitmap
passthrough and text rendering are both kept.

Rename helper to `strip_unknown_codec_subtitle_mappings` to match the
narrower scope.

Replace the now-inverted planner test with two regression tests:
- text subtitle tracks survive the escape hatch
- unknown-codec tracks are still stripped

Closes #93.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L3tSFK3P9vGwbNNtb4AYQG
@ScottMorris

Copy link
Copy Markdown
Contributor Author

@codex review

@github-actions

Copy link
Copy Markdown

Spindle JS tests

233 tests  ±0   233 ✅ ±0   5s ⏱️ -1s
 24 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit e19f8b4. ± Comparison against base commit 759d4d5.

@github-actions

Copy link
Copy Markdown

Spindle Rust tests

222 tests  +1   222 ✅ +1   2s ⏱️ ±0s
  2 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit e19f8b4. ± Comparison against base commit 759d4d5.

This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.
tauri-plugin-spindle-project ‑ build::planner::tests::build_plan_skip_unsupported_streams_removes_text_subtitles
tauri-plugin-spindle-project ‑ build::planner::tests::build_plan_skip_unsupported_streams_keeps_text_subtitles
tauri-plugin-spindle-project ‑ build::planner::tests::build_plan_skip_unsupported_streams_removes_unknown_codec_subtitles

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e19f8b4a3e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

asset.subtitle_streams.iter().any(|s| {
s.index == sm.source_stream_index && s.subtitle_type == SubtitleType::Bitmap
s.index == sm.source_stream_index
&& s.subtitle_type != SubtitleType::Unknown

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the skip-streams toggle copy in sync

Now that this predicate intentionally keeps SubtitleType::Text, the Settings page still says the toggle will “Automatically strip text-based subtitle mappings” and is useful to “author without them” (apps/spindle/src/pages/SettingsPage.tsx:234-235). When a user with only text subtitles enables that setting based on the UI, the planner now retains those mappings and emits RenderTextSubtitles jobs instead, so builds can still fail in the text-subtitle path or produce subtitles contrary to the documented behaviour.

Useful? React with 👍 / 👎.

@ScottMorris ScottMorris merged commit 9389890 into main Jun 25, 2026
8 checks passed
@ScottMorris ScottMorris deleted the fix/issue-93-skip-unsupported-strips-text-subs branch June 25, 2026 04:27
ScottMorris added a commit that referenced this pull request Jun 25, 2026
## Summary

Follow-up to #98 / #93, caught in Codex review.

The "Skip unsupported streams" toggle label and description said it
would strip text-based subtitle mappings. Since #98 changed the
behaviour so only unknown-codec streams are stripped, the copy was now
actively misleading — a user enabling the toggle based on the
description would expect text subtitles to be dropped, but they'd still
be rendered.

- Label: "Skip unsupported streams" → "Skip unknown-codec streams"
- Description: rewritten to accurately describe what the toggle does
- Settings test selector updated to match

## Test plan
- [x] `pnpm test:js` (233/233 passing)
- [x] `pnpm format:check`
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.

"Skip unsupported streams" strips all text subtitles instead of only empty ones

1 participant