diff options
| author | 854562 <44002186+854562@users.noreply.github.com> | 2026-07-20 22:00:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-20 22:00:10 +0200 |
| commit | 2cd2f36fe4912cb465cf5e78a055463f8a5c44a9 (patch) | |
| tree | 66aa4121c8da9fa4253223428fc3810189c88e7f /Jellyfin.Server.Implementations | |
| parent | c632417dda8e3f9a2472ad0bdd43c69d38d95f62 (diff) | |
Extract truncation logic to helper and add tests
Diffstat (limited to 'Jellyfin.Server.Implementations')
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs index 17cfdffe84..a25629132b 100644 --- a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs +++ b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs @@ -172,11 +172,7 @@ public class MediaStreamRepository : IMediaStreamRepository if (!string.IsNullOrEmpty(dto.Language)) { - var culture = _localization.FindLanguageInfo(dto.Language); - // Truncate at the first delimiter to avoid cluttered display names - dto.LocalizedLanguage = culture?.DisplayName is { } name - ? name.Split([';', ','])[0].Trim() - : null; + dto.LocalizedLanguage = _localization.GetLanguageDisplayName(dto.Language); } if (dto.Type is MediaStreamType.Audio) |
