Skip to content

Persist subtitle setting across restarts with optional fallback to first found#3301

Open
GRBaset wants to merge 2 commits into
futo-org:masterfrom
GRBaset:master
Open

Persist subtitle setting across restarts with optional fallback to first found#3301
GRBaset wants to merge 2 commits into
futo-org:masterfrom
GRBaset:master

Conversation

@GRBaset
Copy link
Copy Markdown

@GRBaset GRBaset commented May 17, 2026

Currently, the "Persist subtitles" option only works during a single session, so users have to manually enable subtitles if desired every single time the app is restarted, which is not the behavior I expected of such an option, and there's no option to make it persistent across restarts. The reason this happens is that the language of the last selected subtitles is saved to a variable but isn't persisted to storage, which I do in this PR. I didn't make it into a separate option since it doesn't seem to me that the original behavior is intended or useful.

Additionally, since users may watch videos in multiple different languages, I have added a fallback setting for when the chosen language is not found. I originally intended to add a fallback to the original video language (mirroring the original audio setting), but unfortunately the audio tracks don't seem to have an associated language, at least on YouTube. So instead I added a fallback to the first subtitles found, which seems to work as intended (falling back to the original language) in most cases. This option is disabled by default, as enabling it means subtitles will always be enabled if possible.

I believe these changes combined address issue #2706.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant