mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-14 04:13:20 +00:00
[vimeo] Fix formats' sorting (closes #13189)
This commit is contained in:
parent
884d09f330
commit
e834f04400
|
@ -151,10 +151,16 @@ def _parse_config(self, config, video_id):
|
||||||
else:
|
else:
|
||||||
mpd_manifest_urls = [(format_id, manifest_url)]
|
mpd_manifest_urls = [(format_id, manifest_url)]
|
||||||
for f_id, m_url in mpd_manifest_urls:
|
for f_id, m_url in mpd_manifest_urls:
|
||||||
formats.extend(self._extract_mpd_formats(
|
mpd_formats = self._extract_mpd_formats(
|
||||||
m_url.replace('/master.json', '/master.mpd'), video_id, f_id,
|
m_url.replace('/master.json', '/master.mpd'), video_id, f_id,
|
||||||
'Downloading %s MPD information' % cdn_name,
|
'Downloading %s MPD information' % cdn_name,
|
||||||
fatal=False))
|
fatal=False)
|
||||||
|
for f in mpd_formats:
|
||||||
|
if f.get('vcodec') == 'none':
|
||||||
|
f['preference'] = -50
|
||||||
|
elif f.get('acodec') == 'none':
|
||||||
|
f['preference'] = -40
|
||||||
|
formats.extend(mpd_formats)
|
||||||
|
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
text_tracks = config['request'].get('text_tracks')
|
text_tracks = config['request'].get('text_tracks')
|
||||||
|
|
Loading…
Reference in a new issue