]> jfr.im git - yt-dlp.git/commitdiff
[extractor/youtube] Subtitles cannot be translated to `und`
authorpukkandan <redacted>
Tue, 29 Nov 2022 23:47:45 +0000 (05:17 +0530)
committerpukkandan <redacted>
Tue, 29 Nov 2022 23:48:18 +0000 (05:18 +0530)
Closes #5674

yt_dlp/extractor/youtube.py

index 79d082d0be3ce7b3db1f8fbb989e8dfee84ce517..c6c89915b41aff7b7acb278b81abdd804cb4ca0c 100644 (file)
@@ -4085,7 +4085,7 @@ def process_language(container, base_url, lang_code, sub_name, query):
                     if not trans_code:
                         continue
                     orig_trans_code = trans_code
-                    if caption_track.get('kind') != 'asr':
+                    if caption_track.get('kind') != 'asr' and trans_code != 'und':
                         if not get_translated_subs:
                             continue
                         trans_code += f'-{lang_code}'