Skip to content

Commit 69b4f69

Browse files
authored
fix(AU-2128): Let 'en' be selected as transcript by default when youtube video (#35116)
1 parent e02a22f commit 69b4f69

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

xmodule/video_block/transcripts_utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,8 +866,11 @@ def get_default_transcript_language(self, transcripts, dest_lang=None):
866866
"""
867867
sub, other_lang = transcripts["sub"], transcripts["transcripts"]
868868

869-
if dest_lang and dest_lang in other_lang.keys():
870-
transcript_language = dest_lang
869+
if dest_lang:
870+
if dest_lang in other_lang.keys():
871+
transcript_language = dest_lang
872+
elif dest_lang == 'en' and (not other_lang or (other_lang and sub)):
873+
transcript_language = 'en'
871874
elif self.transcript_language in other_lang:
872875
transcript_language = self.transcript_language
873876
elif sub:

0 commit comments

Comments
 (0)