fix: subtitles no longer depend on the Settings preference

Verified in the running app: captions render on a downloaded video and
on a stream, and the player's menu lists them under SUBTITLES beside
AUDIO.

Three things were wrong.

The preference decided whether subtitles were fetched at all, so "Off"
— the old default, which nobody had to choose — silently emptied the
subtitle menu as well. Fetching now happens regardless; the preference
only says which language switches itself on.

Choosing a track from the menu moved the preference from "off" to that
language, which re-ran the fetch, tore down the tracks and stalled the
stream mid-play. The fetch keys on the language it would ask for, not
on the preference, and that value does not change when "off" becomes
the language it already stood for.

The preference was re-applied on every poll of the track list, so a
choice made in the menu was undone a second later. It now applies once
per set of tracks, which also makes "Off" mean off.

Anyone still carrying the old "off" default is moved to English once.
An Off chosen deliberately after this is left alone.
This commit is contained in:
vincent
2026-08-29 16:46:34 +02:00
parent 967bcdde93
commit 62110b28fc
5 changed files with 76 additions and 62 deletions
+6 -6
View File
@@ -276,12 +276,12 @@ export default function Settings({
</select>
</label>
<p className={`mt-2 ${HELP}`}>
Shown whenever a video has subtitles in this language, including YouTube's
auto-generated ones on most videos those are the only ones there are.
Downloads keep them beside the file for offline use; streams fetch them
separately, because YouTube's live manifest carries no subtitles at all.
<b> None means no subtitles anywhere.</b> You can still switch tracks from
the player.
Which language switches itself on, including YouTube's auto-generated
captions on most videos those are the only ones there are. Downloads keep
them beside the file for offline use; streams fetch them separately, since
YouTube's live manifest carries no subtitles at all. <b>Off</b> only means
nothing comes on by itself: whatever a video has is still listed in the
player's subtitle menu.
</p>
</section>