From cca818fabbcec2cc49ef65ba834c0e50d8fc2640 Mon Sep 17 00:00:00 2001 From: Jannik Mahr <156718546+Jannik-M91@users.noreply.github.com> Date: Wed, 11 Mar 2026 04:44:44 +0100 Subject: [PATCH] Improve display of "DTS:HD" and "DTS:HD MA" audio tracks (#1064) ## Description The formatter for audio codecs did only match the profile of high definition DTS streams against "DTS:HD" or "DTS:X". At least for DTS:HD there are also cases where the profile contains "DTS-HD" with "-" instead of ":". Made the matcher more generic by allowing both "-"" or ":"" and also checking if the profile contains "MA" for Master Audio tracks. This will now correctly display the following high definition DTS types in the UI: - DTS:HD - DTS:HD MA - DTS:X **Note:** This is my first public pull request ever, let me know if I did it wrong :) ### Related issues Relates to (but does not fix): https://github.com/damontecres/Wholphin/issues/1057 ### Testing Tested on a Fire TV Cube Gen 3 with multiple files containing DTS HD audio tracks. --------- Co-authored-by: Damontecres --- .../wholphin/ui/util/StreamFormatting.kt | 13 +++++++------ app/src/main/res/values-cs/strings.xml | 1 + app/src/main/res/values-da/strings.xml | 1 + app/src/main/res/values-de/strings.xml | 1 + app/src/main/res/values-es/strings.xml | 1 + app/src/main/res/values-et/strings.xml | 1 + app/src/main/res/values-fr/strings.xml | 1 + app/src/main/res/values-in/strings.xml | 1 + app/src/main/res/values-it/strings.xml | 1 + app/src/main/res/values-pt-rBR/strings.xml | 1 + app/src/main/res/values-pt/strings.xml | 1 + app/src/main/res/values-tr/strings.xml | 1 + app/src/main/res/values-uk/strings.xml | 1 + app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 16 files changed, 22 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/util/StreamFormatting.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/util/StreamFormatting.kt index ca6e4027..15d35b3b 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/ui/util/StreamFormatting.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/ui/util/StreamFormatting.kt @@ -92,12 +92,13 @@ object StreamFormatting { context.getString(R.string.dolby_atmos) } - profile?.contains("DTS:X", true) == true -> { - context.getString(R.string.dts_x) - } - - profile?.contains("DTS:HD", true) == true -> { - context.getString(R.string.dts_hd) + profile?.contains("DTS", true) == true -> { + when { + profile.contains("X", true) -> context.getString(R.string.dts_x) + profile.contains("MA", true) -> context.getString(R.string.dts_hd_ma) + profile.contains("HD", true) -> context.getString(R.string.dts_hd) + else -> context.getString(R.string.dts) + } } else -> { diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 8f32bc3a..e41bd2b5 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -401,6 +401,7 @@ Vyčistit výběr skladeb DTS:X DTS:HD + DTS:HD MA True HD DD DD+ diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 229bc4c8..7fdb5d82 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -397,6 +397,7 @@ Ryd valg af spor DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 2a8884ba..628c465a 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -365,6 +365,7 @@ In 4K anfragen DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 93bf5c7c..e228ac4d 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -401,6 +401,7 @@ Opciones de pista claras DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 10b611eb..85a803a8 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -367,6 +367,7 @@ Vaid sundkorras kuvatud subtiitrid DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 74e702c8..312caa8e 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -382,6 +382,7 @@ Pas de bandes-annonces DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 23e81de6..dc94ff96 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -369,6 +369,7 @@ Hapus pilihan trek DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 3142001e..596d898f 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -383,6 +383,7 @@ Solo sottotitoli forzati DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index ed794d85..94da1f4d 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -405,6 +405,7 @@ Limpar escolhas de faixas DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 6d8ac4e0..b4f44186 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -382,6 +382,7 @@ Apagar seleções de faixas DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 213ef136..4e4c1838 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -394,6 +394,7 @@ Parça seçimlerini temizle DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 1a31690d..f7835121 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -432,6 +432,7 @@ Чіткий вибір доріжки DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 3134076d..b78e3322 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -351,6 +351,7 @@ 仅强制字幕 DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 5bf09d0f..c96c987f 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -349,6 +349,7 @@ 無預告片 DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+ diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 66276854..a28fbaae 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -451,6 +451,7 @@ Clear track choices DTS:X DTS:HD + DTS:HD MA TrueHD DD DD+