Skip to content

feat(settings): add UI defaults for audio/subtitle language and subtitle type - #881

Open
huynhsontung with Copilot wants to merge 2 commits into
mainfrom
copilot/feature-set-default-audio-subtitle-settings
Open

feat(settings): add UI defaults for audio/subtitle language and subtitle type#881
huynhsontung with Copilot wants to merge 2 commits into
mainfrom
copilot/feature-set-default-audio-subtitle-settings

Conversation

Copilot AI commented May 9, 2026

Copy link
Copy Markdown
Contributor

Users could only set preferred audio/subtitle languages through advanced VLC arguments or per-playback track selection. This change adds first-class Settings UI for these preferences and applies them in app playback logic (not LibVLC startup arguments).

  • Settings surface (Player section)

    • Added new preferences:
      • Preferred audio language
      • Preferred subtitle language
      • Preferred subtitle type (Any, Full subtitles, Signs / songs)
    • Added corresponding en-US resource strings for labels/descriptions/options.
  • Persisted settings model

    • Extended ISettingsService/SettingsService with:
      • PersistentAudioLanguage
      • PersistentSubtitleTypePreference
    • Reused existing PersistentSubtitleLanguage for subtitle language selection from Settings.
  • Playback selection logic (application-side)

    • On media item change, applies preferred audio language against available audio tracks.
    • Subtitle language matching now supports subtitle type prioritization:
      • Any: first language match
      • Full: prefer non-signs/song tracks
      • Signs / songs: prefer signs/song/lyric/forced-labeled tracks
    • Track selections made from the in-player picker update persisted language preferences.
  • Example (selection behavior)

int? selectedIndex = subtitleTypePreference switch
{
    2 => signSongMatch ?? firstMatch,
    1 => fullMatch ?? firstMatch,
    _ => firstMatch
};

if (selectedIndex is int value)
{
    subtitleTrackList.SelectedIndex = value;
}
    • User-provided screenshot URL was reviewed but does not show these newly added settings controls, so it is not included as UI evidence for this PR.
Copilot AI changed the title [WIP] Add default audio and subtitle settings in UI May 9, 2026
Copilot AI requested a review from huynhsontung May 9, 2026 03:05
@huynhsontung
huynhsontung force-pushed the copilot/feature-set-default-audio-subtitle-settings branch from d6cf7fc to 5ee3a2c Compare June 12, 2026 07:27
@huynhsontung
huynhsontung marked this pull request as ready for review June 12, 2026 07:29
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jun 12, 2026
@United600

Copy link
Copy Markdown
Collaborator

After a brief review, I wasn't particularly impressed.

I wouldn't make the default audio or subtitle language that prominent (if at all). Each setting fits better as its own card within the Advanced expander.

And about the subtitle behavior, I really dislike how it's implemented. It makes more sense as an enum, and the strings/options need a thorough rewrite. It's far too English and anime‑centric, and it would even fail one of the examples in #837.
SDH and Forced tracks should be included in the supported set of behaviors.

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

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

3 participants