fix: show 'Title - Language' in subtitle/audio track selector (matches Jellyfin style) - #236
Merged
dragonflylee merged 3 commits intoJul 23, 2026
Conversation
When multiple subtitle tracks share the same title (e.g. 'CR' from Crunchyroll releases), the track selector showed identical entries with no way to distinguish them. Fix by appending the language code in parentheses when both title and lang fields are present: e.g. 'CR (en)', 'CR (it)', 'CR (de)'. Fixes display issue reported with MKV files containing multiple subtitle tracks from the same source (Erai-raws / Crunchyroll).
Previously the track label used only the mpv 'title' field, falling back to 'lang' only when title was absent. This caused tracks like Crunchyroll releases where all subtitles share the title 'CR' to appear identical. Now the label is built as 'Title - Language name' (e.g. 'CR - English', 'CR - Italian') mirroring how Jellyfin displays subtitle tracks. A langCodeToName() helper maps ISO 639-1/2 codes to full English language names so the output is human-readable rather than raw 'eng'/'ita' codes.
Simple one-liner fix: show 'Title - lang' (e.g. 'CR - eng') so that tracks sharing the same title are distinguishable in the selector.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When multiple subtitle (or audio) tracks share the same
titlefield in an MKV file — a common occurrence with Crunchyroll/Erai-raws releases where all tracks are titledCR— the track selector shows identical, indistinguishable entries.Root Cause
In
app/src/view/player_setting.cpp, the track label was built as:The
langfield was only used as a fallback whentitlewas empty. When title was non-empty but identical across all tracks (e.g.CR), the language was never shown.Fix
Added a
langCodeToName()helper that maps ISO 639-1 (2-letter) and ISO 639-2 (3-letter) codes to full English language names, then builds the label as"Title - Language"— mirroring exactly how Jellyfin displays track selection:Result
With a real-world MKV file (Saga of Tanya the Evil S02E03, Erai-raws/Crunchyroll):
This applies to both subtitle and audio tracks.