From 17bed524f20c095708fa6f6b6430bee93e6636bf Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Sun, 8 Oct 2023 18:21:48 -0500 Subject: [PATCH] fix ui display of multiple languages (#1474) --- CHANGELOG.md | 2 ++ ErsatzTV.Application/Artists/Mapper.cs | 3 +-- ErsatzTV.Application/Movies/Mapper.cs | 3 +-- ErsatzTV.Application/Television/Mapper.cs | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4814860f..1ed1924c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix some cases where ffmpeg process would remain running after properly closing ErsatzTV - Fix QSV HLS segment duration - This behavior caused extremely slow QSV stream starts +- Fix displaying multiple languages in UI for movies, artists, shows ### Changed - Upgrade ffmpeg to 6.1, which is now *required* for all installs @@ -43,6 +44,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - In FFmpeg Profile editor, only display hardware acceleration kinds that are supported by the configured ffmpeg - Test QSV acceleration if configured, and fallback to software mode if test fails - Detect QSV capabilities on Linux (supported decoders, encoders) +- Use hardware acceleration for error messages/offline messages ## [0.8.2-beta] - 2023-09-14 ### Added diff --git a/ErsatzTV.Application/Artists/Mapper.cs b/ErsatzTV.Application/Artists/Mapper.cs index 005c07d8..ac6ea422 100644 --- a/ErsatzTV.Application/Artists/Mapper.cs +++ b/ErsatzTV.Application/Artists/Mapper.cs @@ -29,12 +29,11 @@ internal static class Mapper CultureInfo[] allCultures = CultureInfo.GetCultures(CultureTypes.NeutralCultures); return languages - .Distinct() .Map( lang => allCultures.Filter( ci => string.Equals(ci.ThreeLetterISOLanguageName, lang, StringComparison.OrdinalIgnoreCase))) - .Sequence() .Flatten() + .Distinct() .ToList(); } } diff --git a/ErsatzTV.Application/Movies/Mapper.cs b/ErsatzTV.Application/Movies/Mapper.cs index 9cf0b1d1..3f8d9db9 100644 --- a/ErsatzTV.Application/Movies/Mapper.cs +++ b/ErsatzTV.Application/Movies/Mapper.cs @@ -46,13 +46,12 @@ internal static class Mapper CultureInfo[] allCultures = CultureInfo.GetCultures(CultureTypes.NeutralCultures); return languageCodes - .Distinct() .Map( lang => allCultures.Filter( ci => string.Equals(ci.ThreeLetterISOLanguageName, lang, StringComparison.OrdinalIgnoreCase))) - .Sequence() .Flatten() .Map(ci => ci.EnglishName) + .Distinct() .ToList(); } diff --git a/ErsatzTV.Application/Television/Mapper.cs b/ErsatzTV.Application/Television/Mapper.cs index b54e5469..f4229c50 100644 --- a/ErsatzTV.Application/Television/Mapper.cs +++ b/ErsatzTV.Application/Television/Mapper.cs @@ -104,12 +104,11 @@ internal static class Mapper CultureInfo[] allCultures = CultureInfo.GetCultures(CultureTypes.NeutralCultures); return languages - .Distinct() .Map( lang => allCultures.Filter( ci => string.Equals(ci.ThreeLetterISOLanguageName, lang, StringComparison.OrdinalIgnoreCase))) - .Sequence() .Flatten() + .Distinct() .ToList(); } }