Skip to content

fix: group subtitles by language - #3127

Open
refirestream wants to merge 1 commit into
recloudstream:masterfrom
Sarlay:fix/subtitle-language-grouping
Open

fix: group subtitles by language#3127
refirestream wants to merge 1 commit into
recloudstream:masterfrom
Sarlay:fix/subtitle-language-grouping

Conversation

@refirestream

Copy link
Copy Markdown
  • Group subtitle tracks by language name derived from IETF tag instead of raw originalName (e.g. "fr" and "French [SUB]" now land in the same "French" group)
  • Fall back to "Unknown" group when language cannot be resolved
  • Label tracks within a group by originalName instead of nameSuffix
  • Filter subtitles by IETF tag match instead of name substring, matching primary subtag so regional variants (pt-br) match (pt)
  • Keep subtitles with unresolvable language instead of dropping them (goes into the Unknown group)

- Group subtitle tracks by language name derived from IETF tag
  instead of raw originalName (e.g. "fr" and "French [SUB]" now
  land in the same "French" group)
- Fall back to "Unknown" group when language cannot be resolved
- Label tracks within a group by originalName instead of nameSuffix
- Filter subtitles by IETF tag match instead of name substring,
  matching primary subtag so regional variants (pt-br) match (pt)
- Keep subtitles with unresolvable language instead of dropping them
- Only exempt DOWNLOADED_FILE from filtering so embedded tracks
  are also filtered across player reloads
- Use getApiProviderLangSettings + fromCodeToLangTagIETF for
  proper tag normalization in the filter list
@refirestream

Copy link
Copy Markdown
Author

Doing this pull request, I discovered that there is a setting to filter out "useless" languages in :
Settings > Player > Subtitles > "Filter by preferred media language".
I believe that should be enabled by default. What do you think ?

People that have not selected the correct languages during setup might be annoyed though. If we enable the "Filter by preferred media language" setting now, will it change the value for existing users ?

@refirestream

Copy link
Copy Markdown
Author

I tested the app manually and its working well

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant