Closes #2215
This commit is contained in:
pukkandan 2022-01-03 20:39:46 +05:30
parent a13e684813
commit 61e9d9268c
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698

View file

@ -775,7 +775,7 @@ def add(meta_list, info_list=None):
stream_idx = 0 stream_idx = 0
for fmt in info.get('requested_formats') or []: for fmt in info.get('requested_formats') or []:
stream_count = 2 if 'none' not in (fmt.get('vcodec'), fmt.get('acodec')) else 1 stream_count = 2 if 'none' not in (fmt.get('vcodec'), fmt.get('acodec')) else 1
lang = ISO639Utils.short2long(fmt['language']) or fmt.get('language') lang = ISO639Utils.short2long(fmt.get('language') or '') or fmt.get('language')
for i in range(stream_idx, stream_idx + stream_count): for i in range(stream_idx, stream_idx + stream_count):
if lang: if lang:
metadata[str(i)].setdefault('language', lang) metadata[str(i)].setdefault('language', lang)