[InfoExtractor] Fix merging subtitles to empty target

This commit is contained in:
dirkf 2025-04-04 11:43:32 +01:00
parent 2c247176a6
commit 1b8fbad7c5

View File

@ -3295,7 +3295,11 @@ class InfoExtractor(object):
""" Merge subtitle dictionaries, language by language. """
# ..., * , target=None
target = kwargs.get('target') or dict(subtitle_dict1)
target = kwargs.get('target')
if target is None:
target = dict(subtitle_dict1)
else:
subtitle_dicts = (subtitle_dict1,) + subtitle_dicts
for subtitle_dict in subtitle_dicts:
for lang in subtitle_dict: