From 9f0fe94e8afb58b88a3465bba3ff5a0bdf5558b6 Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Wed, 25 Dec 2024 05:09:21 +0000 Subject: [PATCH] Make audio description the lowest priority Co-Authored-By: pukkandan --- yt_dlp/extractor/rts.py | 2 +- yt_dlp/extractor/srgssr.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/rts.py b/yt_dlp/extractor/rts.py index 09a73c20b..16bc3b17f 100644 --- a/yt_dlp/extractor/rts.py +++ b/yt_dlp/extractor/rts.py @@ -11,7 +11,7 @@ from ..utils import ( from ..utils.traversal import traverse_obj -class RTSIE(SRGSSRIE): +class RTSIE(SRGSSRIE): # XXX: Do not subclass from concrete IE _GEO_COUNTRIES = ['CH'] IE_DESC = 'RTS.ch' _VALID_URL = [ diff --git a/yt_dlp/extractor/srgssr.py b/yt_dlp/extractor/srgssr.py index 4fec06604..7f85aeac0 100644 --- a/yt_dlp/extractor/srgssr.py +++ b/yt_dlp/extractor/srgssr.py @@ -128,6 +128,10 @@ class SRGSSRIE(InfoExtractor): 'quality': q(quality), }) + for idx, fmt in enumerate(formats): + if fmt['format_id'].endswith('(AD)'): + formats[idx]['language_preference'] = -10 + if media_type == 'video': for sub in (media_data.get('subtitleList') or []): sub_url = sub.get('url')