Browse Source

[vimeo] Fix formats' sorting (closes #13189)

master
Sergey M․ 7 years ago
parent
commit
e834f04400
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 8 additions and 2 deletions
  1. 10
      youtube_dl/extractor/vimeo.py

10
youtube_dl/extractor/vimeo.py

@ -151,10 +151,16 @@ class VimeoBaseInfoExtractor(InfoExtractor):
else:
mpd_manifest_urls = [(format_id, manifest_url)]
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,
'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 = {}
text_tracks = config['request'].get('text_tracks')

Loading…
Cancel
Save