aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-01-19 19:00:32 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-01-19 19:00:45 +0530
commitbaf599effa414fe927211a2b334365758d88c32b (patch)
tree790a3b4daef0dbd226772b95812b8e65eecb0aaa
parent8bd1c00bf399ba7002fc21cd399c931e9d301bd8 (diff)
downloadhypervideo-pre-baf599effa414fe927211a2b334365758d88c32b.tar.lz
hypervideo-pre-baf599effa414fe927211a2b334365758d88c32b.tar.xz
hypervideo-pre-baf599effa414fe927211a2b334365758d88c32b.zip
[pbs] de-prioritize AD formats
Related: #2335
-rw-r--r--yt_dlp/extractor/pbs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/yt_dlp/extractor/pbs.py b/yt_dlp/extractor/pbs.py
index ffaa6bf92..e48a2b8e0 100644
--- a/yt_dlp/extractor/pbs.py
+++ b/yt_dlp/extractor/pbs.py
@@ -545,7 +545,7 @@ class PBSIE(InfoExtractor):
for vid_id in video_id]
return self.playlist_result(entries, display_id)
- info = None
+ info = {}
redirects = []
redirect_urls = set()
@@ -660,6 +660,9 @@ class PBSIE(InfoExtractor):
'protocol': 'http',
})
formats.append(f)
+ for f in formats:
+ if (f.get('format_note') or '').endswith(' AD'): # Audio description
+ f['language_preference'] = -10
self._sort_formats(formats)
rating_str = info.get('rating')