diff options
author | Jesús <heckyel@hyperbola.info> | 2022-03-12 06:42:26 +0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-03-12 06:42:26 +0800 |
commit | 68ac3c397529e3d6a0635e08abe8a04058cbdf9c (patch) | |
tree | 9b2f747850b80605d7fc9b249f34e95f7328ba02 | |
parent | b9775db0f6c1013c76bd34784a92943c1c099e17 (diff) | |
parent | a825ffbffa0bea322e3ccb44c6f8e01d8d9572fb (diff) | |
download | hypervideo-pre-68ac3c397529e3d6a0635e08abe8a04058cbdf9c.tar.lz hypervideo-pre-68ac3c397529e3d6a0635e08abe8a04058cbdf9c.tar.xz hypervideo-pre-68ac3c397529e3d6a0635e08abe8a04058cbdf9c.zip |
updated from upstream | 12/03/2022 at 06:42
-rw-r--r-- | yt_dlp/extractor/common.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 354814433..345da9a72 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -3651,11 +3651,11 @@ class InfoExtractor(object): @staticmethod def _merge_subtitle_items(subtitle_list1, subtitle_list2): - """ Merge subtitle items for one language. Items with duplicated URLs + """ Merge subtitle items for one language. Items with duplicated URLs/data will be dropped. """ - list1_urls = set([item['url'] for item in subtitle_list1]) + list1_data = set([item.get('url') or item['data'] for item in subtitle_list1]) ret = list(subtitle_list1) - ret.extend([item for item in subtitle_list2 if item['url'] not in list1_urls]) + ret.extend([item for item in subtitle_list2 if (item.get('url') or item['data']) not in list1_data]) return ret @classmethod |