Make audio description the lowest priority

Co-Authored-By: pukkandan <pukkandan.ytdlp@gmail.com>
This commit is contained in:
Mozi 2024-12-25 05:09:21 +00:00
parent a22562a634
commit 9f0fe94e8a
2 changed files with 5 additions and 1 deletions

View file

@ -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 = [

View file

@ -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')