Fix getPreferredSeason() (again)

fix selection of preferred season for languages other than english
Jannik 2022-03-07 19:43:26 +01:00
parent 30a5331bbc
commit be1c001942
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ data class Seasons(
fun getPreferredSeason(local: Locale): Season {
return items.firstOrNull { season ->
// try to get the the first seasons which matches the preferred local
season.slugTitle.endsWith("${local.displayLanguage}-dub", true)
season.slugTitle.endsWith("${local.getDisplayLanguage(Locale.ENGLISH)}-dub", true)
} ?: items.firstOrNull { season ->
// if there is no season with the preferred local, try to find a subbed season