summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSergey M․ <[email protected]>2017-05-24 22:58:16 +0700
committerSergey M․ <[email protected]>2017-05-24 22:58:16 +0700
commite834f04400ba419b842743224510ca8abaf933c8 (patch)
treea408d19ab82de011e53f0d0ffa8fbab4c85d38cb
parent884d09f3304992837be140e1e22ff44a87cbf6ff (diff)
downloadyoutube-dl-e834f04400ba419b842743224510ca8abaf933c8.tar.gz
youtube-dl-e834f04400ba419b842743224510ca8abaf933c8.zip
[vimeo] Fix formats' sorting (closes #13189)
-rw-r--r--youtube_dl/extractor/vimeo.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py
index 61cc469bf..a483c8409 100644
--- a/youtube_dl/extractor/vimeo.py
+++ b/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')