aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs')
-rw-r--r--Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs5
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)