1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-07-03 10:39:12 +02:00

[abc:iview] deprioritize audio description tracks

This commit is contained in:
ClosedPort22 2024-06-28 09:35:44 +08:00
parent d1789d4a8b
commit 8314fc299d
No known key found for this signature in database

View File

@ -341,6 +341,11 @@ def tokenize_url(url, token):
formats.extend(fmts)
break
# deprioritize audio description tracks
for f in formats:
if 'description' in (f.get('format_note') or '').lower():
f['language_preference'] = -10
subtitles = {}
if src_vtt := traverse_obj(stream, ('captions', 'src-vtt', {url_or_none})):
subtitles['en'] = [{