fixed selecting lang 1 instead of lang

This commit is contained in:
LagradOst 2022-05-26 20:08:32 +02:00
parent 699d43aeb3
commit 1f56d0c12e

View file

@ -480,7 +480,8 @@ class GeneratorPlayer : FullScreenPlayer() {
if (settings)
subtitles.firstOrNull { sub ->
sub.name.replace(Regex("[^A-Za-z]")," ").startsWith("$lang ")
val t = sub.name.replace(Regex("[^A-Za-z]"), " ").trim()
t == lang || t.startsWith("$lang ")
|| sub.name.trim() == langCode
}?.let { sub ->
return sub