diff options
| author | 854562 <44002186+854562@users.noreply.github.com> | 2026-06-22 20:25:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-22 20:25:13 +0200 |
| commit | 94d53264111b2fee3824afeaa0eea69f6ecd7e83 (patch) | |
| tree | 76acde30a784b613f746d5b11fc0d37f54950c6f /Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs | |
| parent | da2b994fff284ef35dcae87beaf9def9072aa18a (diff) | |
Truncate ISO-639-2 language display names at first delimiter
Prevents raw ISO-639-2 values (e.g. "Greek, Modern (1453-)" from cluttering the audio and subtitle display names by truncating them at the first comma or semicolon ("Greek"). Applies to MediaStreamRepository and ProbeResultNormalizer.
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs index 7fa33c8639..b3c7fe131e 100644 --- a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs +++ b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs @@ -173,7 +173,10 @@ public class MediaStreamRepository : IMediaStreamRepository if (!string.IsNullOrEmpty(dto.Language)) { var culture = _localization.FindLanguageInfo(dto.Language); - dto.LocalizedLanguage = culture?.DisplayName; + // Truncate at the first delimiter to avoid cluttered display names + dto.LocalizedLanguage = culture?.DisplayName is { } name + ? name.Split(';', ',')[0].Trim() + : null; } if (dto.Type is MediaStreamType.Audio) |
