mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 21:59:17 +00:00
[ie/beacon] Fix error if subtitle language is not set by Beacon
This commit is contained in:
parent
f1ab9a3d93
commit
6491712ede
|
@ -77,7 +77,9 @@ def _real_extract(self, url):
|
|||
for track in tracks:
|
||||
if traverse_obj(track, 'kind') == 'captions':
|
||||
file = track['file']
|
||||
language = track['language'].lower()
|
||||
language = traverse_obj(track, 'language')
|
||||
if language is None:
|
||||
language = "en"
|
||||
subs = {language: [{'url': file}]}
|
||||
self._merge_subtitles(subs, target=subtitles)
|
||||
|
||||
|
|
Loading…
Reference in a new issue