fix: wrong selection of default audio language

it would always fallback to "en"
as the loop was over array keys not values
This commit is contained in:
bonswouar 2024-12-15 11:44:14 +01:00 committed by Bnyro
parent 62ceb1d940
commit b39574af62

View File

@ -613,7 +613,7 @@ export default {
// Set the audio language // Set the audio language
const prefLang = this.getPreferenceString("hl", "en").substr(0, 2); const prefLang = this.getPreferenceString("hl", "en").substr(0, 2);
var lang = "en"; var lang = "en";
for (var l in player.getAudioLanguages()) { for (var l of player.getAudioLanguages()) {
if (l == prefLang) { if (l == prefLang) {
lang = l; lang = l;
return; return;