Skip to content

Make the sync subtitle delay feature intuitive - #3160

Open
refirestream wants to merge 5 commits into
recloudstream:masterfrom
refirestream:feature/subtitle-delay-too-early
Open

Make the sync subtitle delay feature intuitive#3160
refirestream wants to merge 5 commits into
recloudstream:masterfrom
refirestream:feature/subtitle-delay-too-early

Conversation

@refirestream

Copy link
Copy Markdown

I've always felt like this subtitle delay feature was counter intuitive, the + button on the right should actually make the white slider go forward (meaning that the subtitle was lagging too much behind the audio), as opposed to what is currently implemented.
Screenshot_20260908-165702_CloudStream Debug
This PR implements that.

Your Name and others added 5 commits August 17, 2026 21:02
- Group subtitle tracks by language name derived from IETF tag
  instead of raw originalName (e.g. "fr" and "French [SUB]" now
  land in the same "French" group)
- Fall back to "Unknown" group when language cannot be resolved
- Label tracks within a group by originalName instead of nameSuffix
- Filter subtitles by IETF tag match instead of name substring,
  matching primary subtag so regional variants (pt-br) match (pt)
- Keep subtitles with unresolvable language instead of dropping them
- Only exempt DOWNLOADED_FILE from filtering so embedded tracks
  are also filtered across player reloads
- Use getApiProviderLangSettings + fromCodeToLangTagIETF for
  proper tag normalization in the filter list
Replace the groupName() helper with a single pass that pairs each
subtitle with its resolved language name, then derive the grouping,
the selected group and both start indices from that list instead of
recomputing the name on demand.

Generated with AI
Number tracks that share the exact same original name within a
language group (e.g. two "Français" tracks become "Français 1" and
"Français 2"), reusing the track's own nameSuffix when it has one and
generating a sequential number otherwise. Unique names are untouched.

Generated with AI
Invert the sign convention of the player subtitle delay so the value in
the offset dialog is the number of milliseconds the subtitles are shown
too late (a lag), and a negative value means they are shown too early.

- subtitleDelay no longer negates setSubtitleOffset/getSubtitleOffset, so
  the box value matches the decoder offset sign. The +/> and -/< buttons
  are unchanged, so each press now shifts playback the opposite way.
- Swap the two hint format strings so the wording tracks the new sign
  (positive -> too late, negative -> too early).
- Flip the sync-list position math and the row-tap handler to match the
  new offset sign.

Generated with AI
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.

2 participants