Skip to content

feat(player): add AutoSync glass bubble notifications and secondary language fallback - #794

Closed
test01203 wants to merge 1 commit into
ProdigyV21:mainfrom
test01203:feat/autosync-bubble-notifications
Closed

test01203 wants to merge 1 commit into
ProdigyV21:mainfrom
test01203:feat/autosync-bubble-notifications

Conversation

@test01203

Copy link
Copy Markdown
Contributor

Summary

Enhances the subtitle AutoSync engine with modern glass HUD notifications, secondary language fallback, and sticky user subtitle selection.

Key Changes

  1. Glass Bubble Notifications (הודעות בועת זכוכית):

    • Modern frosted-glass HUD toast (AutoSyncBubbleToastHost & AutoSyncBubbleToast) floating in the player's top-start corner.
    • Non-intrusive backdrop blur with specular gradient borders, animated spinner during fingerprinting/alignment, green checkmark droplet on sync success, and animated offset adjustments.
    • Replaces generic Android Toasts with TV-optimized, smooth fade/slide transitions that automatically dock when player controls toggle.
    • User toggle in Settings under Subtitle AutoSync.
  2. Secondary Preferred Subtitle Language Fallback:

    • If AutoSync or automated matching fails to find or synchronize a match in the primary subtitle language, the engine automatically attempts synchronization against the user's configured secondary subtitle language before falling back to audio delay shifting.
    • Seamlessly integrates with the existing subtitle scoring and alignment pipelines.
  3. Preserve User Subtitle Selection:

    • Explicit manual subtitle selections made by the user are preserved and will not be overridden by background AutoSync runs during playback.

@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Oct 7, 2026

@silentbil silentbil left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for putting this together! I went through the changes to the AutoSync / subtitle matching flow, and I'd prefer not to proceed with this PR, because of the risk to a feature that's working well right now. A few specifics:

1. Secondary-language fallback can leave the scan stuck.
The fallback calls findBestSubtitleMatch(scanLang = secondaryLang) from inside the running scan. At that point the scan hasn't ended yet: isFindingBestMatch is still true until selectLastResort() / endMatch() run. So the nested call returns immediately on its guard. Then return@launch skips the audio-sync fallback and the last-resort pick, and "Adjusting subtitles…" stays on screen for the rest of that playback, blocking further scans. This would hit anyone with a secondary language set whenever the primary language isn't verified.

2. Secondary-language references in audio sync.
englishCandidates() feeds the references that the recognised speech is matched against, and that matching is text-based on English. Subtitles in another language can't match the recognised words, and they compete for the same few slots (PREFETCH_REFERENCES = 2, MAX_REFERENCES = 4), so they can push out the English references that actually make the sync work.

3. "Preserve User Subtitle Selection".
I couldn't find any change for this in the diff. It's also already handled on main: a manual pick sets hasManualSubtitleSelection / userPickedSubtitle, and both auto-selection and audio sync back off when they're set.

Thanks again for the effort and interest in this part of the app!

@test01203 test01203 closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: android Changes to the Android app or Gradle build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants